I am not sure I completely understand the concept. It seems to me that you want 
to add a scripting language to Wt to make development easier, kind of like how 
fast it is to get a site going developing in PHP, something to get you up and 
running faster? My thinking is if it gets your running faster, why can't you 
keep running with it? Which then got my mind thinking about merging Wt with 
Python. But that has things like GILs, etc. For me the strength of Wt is that 
it is not interpreted. Then I got to thinking that your OOP language/library 
should just do it for you. So why can't there be some "site" class and a form 
class. 


Forgive me, I'm not that experienced with Wt, but it seems that if you are 
going to champion OOP of websites, that a fall-back to as scripting language is 
a cop-out. And while the issue is currently about generating a template and 
coding OOP from there, I fear/predict more and more will want to be done with 
the script. So I put the challenge out there... can we jsut add a few classes, 
intellifently derive from them and accomplish the same thing?




________________________________
 From: Matthew Sherborne <[email protected]>
To: [email protected] 
Sent: Wednesday, July 11, 2012 10:29 AM
Subject: Re: [Wt-interest] Code generation script - RFC
 

Hi Nagaev,

Thanks for the ideas.

I've made an initial plan: 
https://github.com/matiu2/witty-codegen/blob/master/README.md

Please have a skim read and see if anything pops out. All comments would be 
most appreciated. Let me know if I've overlooked some great big thing, or if my 
ideas seem crazy, or if you can think of better ways of doing things.

Many Thanks,
Matthew Sherborne




On Tue, Jul 10, 2012 at 7:52 PM, Nagaev Boris <[email protected]> wrote:

Hello!
>
>It would be a great script! If the project will begin, I want to take part.
>
>IMHO, this script should produce minimal code, which would probably
>taken mostly from Wt examples (e.g., pieces of Auth can be taken from
>Hangman example). The code generated should be at the same time
>flexible enough to make it easy to modify or extend it.
>
>I want this script also had these features:
> * add model (asks model name, adds empty model, mapping
>(Session.map<Model>()), maybe also typedef for dbo::ptr and
>dbo::collection)
> * add widget (asks ancestor widget and new widget name, adds empty
>widget, inherited from that ancestor)
> * commands to work with XML translations: add language, add new
>message. I have written script locales-test (
>http://pypi.python.org/pypi/locales-test/1.4.0 ), checking Wt
>translation files, for example, that all translation IDs, passed to
>WString::tr(), are present in .xml files. It can be also used.
>
>There is also a problem of Wt version used. I believe that newer
>versions are better than older ones, however versions restrictions can
>be applied. For example, project requirement can be to use packages
>only from Debian stable (i.e., Wt 3.1.2). So, the script should accept
>Wt version (or version range) as an argument. This causes restrictions
>on other commands of the script. For example, Wt < 3.2.0 had no Auth.
>
>
>On Tue, Jul 10, 2012 at 11:32 AM, Matthew Sherborne
><[email protected]> wrote:
>> Hi guys,
>>
>> I want to ask if there's any interest from the community in working together
>> on some kind of project code generation automation.
>>
>> Witty itself seems to be going the direction of adding higher and higher
>> level libraries, but keeping mega flexibility. For example the auth module,
>> you have to plug together a bunch of pieces to get password auth going.
>>
>> What about either a library on top that says, just give me password auth.
>> Then just give me a form with basic controls for these DB fields.
>>
>> But better than a library, what about a command line code generation script,
>> similar to django-manage, but less magic.
>>
>> The code generation would be better than a library in that you could
>> customize the code after you generated it.
>>
>> It'd be better than django-manage as it'd generate explicit code and not a
>> bunch of airy-fairy magic giving us no idea how it works.
>>
>> Here's my initial thoughts to kick off the conversation; it'd be nice if we
>> could get together a good list of features and a bit of a spec.
>>
>> Here's my initial feature wish list:
>>
>>  * Gen app - asks  for the app name and stuff, generates you a main.cpp, a
>> MainWindow.?pp CMakeLists.txt, and builds and runs it for you, so you can
>> get into witty quickly.
>>  * Gen tests - Creates a tests dir, CMakeLists file (with a nice 'addTest'
>> function that you can use), and an initial test using boost test framework
>>  * Gen Password Auth - Generates an Auth.?pp that just does password auth
>>  * Gen DB - Generates a db directory, CMakeLists.txt, and a User model, and
>> source code for a DB reset/repopulate util app
>>  * reset DB - runs the app from the line above
>>  * Gen Form - Parses a model source file, and generates a form for it, just
>> choosing the simplest widgets it can.
>>
>> You could possibly have different backends, that generate the code in
>> different ways; for example one that uses CSS for layout, one that uses
>> WLayout controls and so on. Or different styles, but if we could standardize
>> the feature list and possibly some sort of calling convention between the
>> layers, this could all happen.
>>
>> That's it for starters for me, it'd be very useful in reducing the learning
>> curve getting into Wt, and encouraging noobs to write pretty code, and for
>> people that write a lot of apps in Wt, could reduce the time to market for
>> each app.
>>
>> I'm sure a lot of us will already have some bits and pieces cobbled
>> together. It might just take a little planning and a little sharing and we
>> can do this.
>>
>> All comments and thoughts appreciated.
>> Matthew Sherborne
>>
>> ------------------------------------------------------------------------------
>> Live Security Virtual Conference
>> Exclusive live event will cover all the ways today's security and
>> threat landscape has changed and how IT managers can respond. Discussions
>> will include endpoint security, mobile security and the latest in malware
>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>> _______________________________________________
>> witty-interest mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/witty-interest
>>
>
>------------------------------------------------------------------------------
>Live Security Virtual Conference
>Exclusive live event will cover all the ways today's security and
>threat landscape has changed and how IT managers can respond. Discussions
>will include endpoint security, mobile security and the latest in malware
>threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>_______________________________________________
>witty-interest mailing list
>[email protected]
>https://lists.sourceforge.net/lists/listinfo/witty-interest
>

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to