This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hey guys :-) While I was playing with LightSpeed I got thinking that it would be cool given a domain model you could generate your sql/or given a database you could generate some LightSpeed classes. Often when I'm prototyping something up I find the duplication is just a pain/can really slow you down - so I got writing a small app - LightGen. Currently it only supports taking a domain model assembly and generating some MS SQL but its just a work in progress I thought I'd put out there. Coming up next I'm going to recompile against the latest release version, add support for the ignore attribute, add a template for generating classes from a database, and tidy up the small gui that is included (some nice icons, text formatting etc) Obviously its experimental at this stage but it works for my small test domain model (very basic but does have inheritance, nullable types, collections, guid and integer primary keys) - if anyone has any other ideas/feature requests/bugs etc then post them here so everyone can see them and I'll get them fixed :-) James ps. The release contains a windows app, console, and the core files - the other folder contains the binary I have generated from and an example configuration file. |
|
|
Thanks James, this looks quite interesting. I fixed up your hyperlink and look forward to you building further on this (and blogging about! ;)) Keep up the great work. - JD |
|
|
Just put up a new release of LightGen :-) (Experimental version 0.1) Fixes/additions for this build are: - Added support for Transient attribute Hope this helps someone :-) James ps. I'm hoping to put in functionality for generating classes off the database in the next release + some other bits and pieces. If there are any requests then let me know. |
|
|
Good times James, when's the MySQL version coming? Drop me a line if you like i've written a basic MySQL CRUD query builder for another project. Bert |
|
|
Bert, LightSpeed would actually take care of not only CRUD but virtually any query you needed to write for MySQL. It would also mean if you ever moved to another database (Oracle, Postgres, SQL Server, SQLite etc) that you could just change the config of your application and not need to worry about changing the SQL for the application. Your second query is a foundational element of what LightSpeed provides. Hope this helps, - JD |
|
|
Hey Bert :-) Thanks for the support! Since you've been the first to ask I'll try and get in a MySQL provider for LightGen in one of the next coming releases (maybe even put some instructions in the release on what I have done so anyone can write one for any dbms they have). I've been a little swamped this week but I'll look into getting this in asap. All the best, James |
|
|
Finally another release of LightGen is here (0.2) :-) I've been a little busy so haven't added lots of features - however, the new release does have a MyGeneration template for creating LightSpeed classes from an existing database schema if thats more your style. I havent tested the template that much (lack of time) but its there so feedback any bugs and I'll get the changes patched in... James |
|
|
Hey Jim, I am using your MyGeneration template, and it spitting out Unknown for all of the data types. Is that my setup, or a yet to be implemented feature?
Chur |
|
|
Hey mate :-) Awesome to have some feedback coming all the way from up there in the UK! What dbms are you using? I have only run this against SQL 2005 but if you have another one you are running against I will install it and start patching away :-) |
|
|
SQL Server 2005 .... |
|
|
Hmmm weird... Do other mygen templates work ok? I re-ran my template last night and it seems to work ok for me - I have only tested it against a few basic datatypes (int, uniqueidentifier, datetime etc) though... If you step into the template (specifically the GetDataType method) are there any clues as to why it might be breaking? Are the collections etc coming out ok? (just had a thought but can't test it now - I hope I packaged the right one for release - I'll double check again tonight...) |
|