OpenSource For You

Code generation

-

Code generation (or codegen) is the most distinguis­hing feature of nCubed. It is this one feature that makes your developmen­t process so very fast, by removing a large part of the tedious, mundane tasks you have to do when developing. vou should be excited—there are multiple things that codegen brings to the table.

lne of its major advantages is that it minimises the amount of SnL queries you have to write, and all the routine tasks that come with each (parsing the results for SbLbCT queries, writing queries to insert or update data, and so on). nCubed achieves it by creating individual classes for each table. vou can access the rows of the database as objects of that class. To get the columns of a row, you access the properties of the row object. It also generates functions for selecting data from the WDEOH, whLFh FUHDWH SQL TXHULHs DXWRPDWLFD­OOy; yRX JHW UHsXOWs as an array of objects, which is a lot easier to play around with.

In real life or databases, handling relationsh­ips is a pain when there are too many! The codegen process will create functions for handling relationsh­ips for each of your tables. It will consider your foreign keys and will allow you to TXHUy WDEOHs XsLQJ WhRsH PHWhRGs; WhHy WRR DUH JHQHUDWHG automatica­lly! So loading the blog post of a comment is actually just one more word at the distance of an arrow mark, that's it!

Indexes have a reason to exist—they make queries run faster at the database level. nCubed's code generator acknowledg­es this, and creates special functions for columns RQ whLFh LQGHxHs DUH GHfiQHG. ThLs PDNHs sXUH WhDW yRX

Newspapers in English

Newspapers from India