Hacking the development : Building by Definition


Hacking the project development !! I have been thinking lately, I personally do lot of projects outside my job, some ones are merely CRUD application over the web and some are novel applications.

Philosophy :)


The best way to do a job is not to repeat the same things again. I like products and I like components which we can re-use which can save hours setting up and starting things. Some of the best "on-the-fly" tools like 'Spring-ROO' miss the personalization of things we want on the web development projects.

For example, ROO can create a spring web project structure but what about wiring them with UI, customized UI templates to load the data. Input forms which just mimic the DB we have. So there should be a silver bullet customized to our needs where it can just create all the layers of the web project.

After working around for more than several years in lots of personalized projects, I would hate myself to copy a piece of code from other project and put it here. But yes, I agree I do it lot of times :). It will work fine, but I personally hate myself to do it. But just keeping a code common or building a jar will serve the solution, but not always.

Introspection


The good solution is just to have a personalized application builder which can ask for what tables are, what is the UI designs of the form to get input, what are the joint forms across table columns and just create a complete project for you. So what it would be like a input mechanism where we say


table:{ 'tableName': 'crazy', columns:{'who','how','when'}}

form:{'table':'crazy','UI':{'who':'Myself','how':'thinking too much','when':'02:23:1983'}}

actions:{'pathPrefix':'/crazy','add':'/add'}

This is the simplest form of the definition of a simple page form. When it is fed, the builder should take care of creating a eclipse project, maven setup, sql files and finally the whole project should work perfectly.

Wow! that sounds magical. This is too good to be true. But yes as I am writing this, deep in my heart I smile because I have done that for all my projects. Which will have JS Library, Backend-Java Code all generated from this builder I wrote.

Naming It


What is in a name? Yes, But I have named it as 'Chitti Version 1.0' (Inspired by ROBO film). This way it makes me interesting to work on it and shape it as I want. This is basically an interpreter which takes input JSON (for now), for application definition and creates sources including the Controllers, DAO, Business Services plus this will include the JS library for form loading, table loading and all CRUD operations.

I never had any timeline for this to build, because I modularized whenever I was working on other projects. I built it and making it to include, as when I see anything to be included.

I don't know will that be a future taking into considerations about things that would change like technology , complexity, business rules, etc., but this make me to think modularized and saves me lot of time, even If I end up doing more things in future it can grow and can do more neat things just by definition.

Sharing Is Growing


I wish and Love to share the code, but things good to me would be irrelevant to others as what others will want. May be I will share the code if we people are interested. Let me know if you are. I am happy to help and grow. :)


Comments

Anonymous said…
Always its good 2 be shared, good work my wishes but its a long way 2 me - vijay anandh
Raghav said…
"So what it would be like a input mechanism where we say" -
I guess turbo gears with
* JS in the UI side
* Python on the server/ processing side and
* JSON to run the errand (even a xml would do it, as its an errand, which is to be very quick, JSON should be THE thing)

a framework like turbogears should be a perfect thing.

Sure you must have had a look at TG, anyways http://turbogears.org/1.1/docs/BigPicture.html

TG also provides excellent ways to communicate with DB using a DAO/ DB layer of code (and with SQLAlchemy from pylons)... and the link here is from a old version on TG. TG's later versions give excellent templating capabilities esp. with a MAKO or a GENSHI... where with help of a JS framework like jquery or dojo or node.js for example might make the making of a web app comparatively much simpler than a Spring/ Hibernate setup.

Having said that my opinion might be heavily biased as I personally believe Python as the language which is has the ninja of perl into it and the robust-ness of Java into it.

Let me know what you think.

PS: I am yet to have a look at Spring-ROO, anything to go hit at?
M3hm0^2d: said…
Thanks for your comments Raghav. I don't know much about TurboGears , but it looks completely aligned for what I am doing. But it misses somethings like templating for AJAX Responses, where we can fit in some drivers, but still the definition of code would be specific to each project we do right.

So What I have done is an input which just defines a JSON of what is the UI, how to tie to DB and what actions available.

The builder will take care of what we need for initial kickstart of CRUD operations, then we will have some code , to work upon instantly to include the logic we need.

But I like the templating stuff mentioned here, I had looked in JinJa2 http://jinja.pocoo.org/ too. But I like Spring/JPA rather Hibernate combination, which I can say the most simplest form of way of doing things in JAVA. So I am tied to it for several years, I like that.

But atlast it saves me time in start and deploy it asap. That matters to me a lot :)
Raghav said…
"saves me time in start and deploy" - a start is very important. Sometimes the biggest step.

I would also agree on Spring in comparison to Hibernate for a quicker start and push.

BTW, Turbogears does support AJAX. In its later versions with some more components like dojo I presume.

It is good to speak and discuss on varieties of such possibilities. Do keep up your good work and post them. :)

All the best!

Popular posts from this blog

Hibernate queries are slow ! SQL Server's are not my type ? - Here is what you need to know!

IFTTT Service descriptions with Google Search

Detecting browser event closing in Javascript