KelpX::Sweet

60 views
Skip to first unread message

Brad

unread,
Dec 25, 2014, 3:52:23 PM12/25/14
to perl...@googlegroups.com
Hey guys, me again! Hope you're all having a wonderful Christmas. Me, I was coding. Sad, right?
Anyways, I've created a new module called KelpX::Sweet. A way to make Kelp a little more declarative. It's still in the works, but a simple app will be fully functional. If you use the kelpx-sweet script, it will help you create a working app right off the bat.
Download and documentation on github as usual!

https://github.com/bradhaywood/KelpX-Sweet

Cheers,
Brad

Stefan Geneshky

unread,
Dec 26, 2014, 12:22:56 AM12/26/14
to perl...@googlegroups.com
Hey Brad,

This is really cool! I am still reading it and trying to wrap my head around it. Could you give a little more information with examples please?
I am particularly interested in how this is different form Kelp::Less.

Thanks,
Stefan

Brad

unread,
Dec 26, 2014, 11:29:12 AM12/26/14
to perl...@googlegroups.com
Thanks! I'm not sure if it's already possible with Kelp::Less, but I created to give you a way to "categorise" routes. So instead of one large file full of 'get', 'post' calls, you can add them in separate modules, then your main .pm will just pull them altogether. In larger applications it just makes it easier to find things. So, you could separate user functions from products, for example.

package MyApp;

use KelpX::Sweet;
maps
['User', 'Product'];

package MyApp::Route::User;
get '/view/:id' => 'Controller::User::view';

package MyApp::Route::Product;
get '/view/:id' => 'Controller::Product::view';


KelpX::Sweet may only be beneficial over Kelp::Less in big projects, just to file code away in easy to find places. Now the foundations are there, I can add some extra features to KelpX::Sweet::Route and hopefully do some cool stuff with KelpX::Sweet::Controller, as that does absolutely nothing at the moment! If you want to do something small for prototyping and such, there is nothing wrong with Kelp::Less at all.
It is still early days for this module, so I'm interested myself to see what comes of it :)

Cheers,
Brad

Stefan Geneshky

unread,
Dec 26, 2014, 5:30:54 PM12/26/14
to perl...@googlegroups.com
Looks very clean. I'm looking forward to using it.

Stefan

Brad

unread,
Dec 26, 2014, 7:59:27 PM12/26/14
to perl...@googlegroups.com
That means a lot, Stefan. Thanks :)
I've just started work on models (already pushed brief functionality to github). There's some documentation there also, to help you get started. Still pretty basic, but it seems to work.

Brad

unread,
Dec 27, 2014, 9:15:21 AM12/27/14
to perl...@googlegroups.com
Models are somewhat useful now. We can do Catalyst like stuff with DBIx::Class. KelpX::Sweet automagically detects if you're using a DBIx::Class::Schema in your model and will create all the relevant models for you! More details here: https://github.com/bradhaywood/KelpX-Sweet#models-and-dbixclass

Brad

unread,
Dec 30, 2014, 9:51:48 AM12/30/14
to perl...@googlegroups.com
We're at a pretty stable point, so welcome to CPAN! I will need to concentrate writing some more tests now, so there probably won't be any new functionality for a while. If you guys have any ideas for new features, or discover a bug, please let me know and I'll take a look!

Cheers,
Brad


On Thursday, December 25, 2014 8:52:23 PM UTC, Brad wrote:
Reply all
Reply to author
Forward
0 new messages