CRUD at the speed of light


At the request of a friend, i started working on a small application to meet a specific need of his business, out of fun mostly. Part of the fun to me was to find out the fastest way to get the application development done.

The first step to perform is modelling. Incidentally, MySQL comes with such a tool in their Workbench application (which is free). This is part of their strategy to lock people into their product i suppose (more on this later). With the model done, it took just a a few clicks to forward-engineer it into a database schema. Nice.

With the database schema ready, an interesting thought popped up – wouldn’t it be nice if the CRUD functionalities to enable data entry could be auto-generated from the model/database. I searched for such form generator software and found that though they exist, they were not very common, and most generated only web-based forms. One of them stood out though – Lightswitch. As this blog entry demonstrates, it has the ability to generate the CRUD related forms/screens directly from the database, taking into account the foreign key references in each table (i.e. it generates a drop-down to select data from another table). Besides that, it offers other screen templates such as editable grid and search screens, plus data validation. You could literally build an application within a minute without writing a single line of code. This was exactly what i was looking for. The downside though, as i looked further into the possibility of extending the application beyond what it automatically generates, is that while it could be customized, it didn’t seem intuitive enough to create entirely new forms and functionalities. Fine, i’ll take what Lightswitch offers – CRUD for the basic entities of the business, thank you very much, and then create another application to cater to the required business functions proper.

Next decision to be made: the choice of the RAD tool for building the application, and there is a long list to choose from. Initially i was considering using one based on Java (building on the Netbeans Platform), but the more i read the documentation, the more i was turned off by the amount of coding just to do something stupid simple. Memories of past Delphi programming experiences kept popping up – drag-and-drop components, double-click and start coding away. Admittedly, the Netbeans Swing GUI Builder isn’t too bad, but it just didn’t seem as straight forward. The present-day Delphi IDE, Prism, is pretty cool, but pretty costly too. On the other hand, i didn’t want to go back to using Delphi 6 or 7, which are about a decade old. Thankfully, there is a an up-to-date and also free alternative – Lazarus. I settled on Lazarus mainly due to my familiarity with Pascal coding and the Delphi environment.

Last step: find time to work on the application!

(Visited 233 times, 1 visits today)





Leave a Reply

Your email address will not be published. Required fields are marked *