How can I add existed DataBase scheme to my DSL as inpuit?
CONNECTION TO REAL DATA or SCHEMES FRAMEWORKS
I want to make some generation from DB to C# classes
with two tasks:
1. use DSL code or some framework - to read DB scheme
and generate some classes or triggers and subscript it to compilers or SQL server.
2. incorporating some logics created in DSL to this process.
Once DSL is code template engine it is expectable that it can provide some PRODUCTION input data or schemes for taking part in generation:
for sample
CodeSmith provides DB scheme or custom schemes for else sources and application
generation become truly PRODUCTION relation and easy as breesy.
does DSL can provide such a really well features?
__
EASY OF USE:
I took CodeSmith yesterday first time,
take 4 hours for learn,
for next 4 hours created application for analyzing database scheme and generating triggers for it and inserting triggers to SQL server back.
Only 1 day.
May be I dump enough but DSL is not supply any such productive methods despite it is same by nature- "Template processing engine".
Does your team provided some way to find how to create such a productive work with DSL?
-what is purpose of any DSL...
I wish DSL be really productive.
thanks
[1421 byte] By [
vgrigor] at [2007-12-24]
Hi vgrigor
The DSL Tools text templating framework when used out of the box is mostly geared up for generating code from your own custom DSL models as a data source as opposed to any other metadata, such as DB schema.
It's possible to write a thing called a custom directive processor (See MSDN docs) to read a live DB schema and make the data directly available to process inside a text template, but we don't provide such a thing. You then wouldn't need to use a DSL model at all.
The focus of the DSL tools is to build domain-specific graphical modeling tools and generate artefacts from them.
Hi GarethJ
I understand you, but strongly disagree.
It is intended as really working thing or interesting experiment?
I learned domain languages much as DSL designer of it in my last company (biggest in russia).
So I know what is really need in serious enterprise, even it is me proposed DSL and use innovative MDA way.
(I have many books on MDA so also please not explain me that it is different thing. good DSL is MDA.)
even I tried to create "DSL complete"(DSL as only source) way, as you constantly propose. It was hard and worst in result. Sorry, but it was really so.
(I was thinking Microsoft can not make not deep constructed thing, it is me who not understand. But not I not think so.)
"Just DSL" is not productive concept really.
Any participant will connect it to DB or else scheme - by self - using hard scenarios, worst and risky way.
reason of bad results seems for me as following:
Still DSL is just template processing and not of any more high abstraction level productive constructs provided with it, (business logics, UP mapping, new DB concept as 'ADO new' as MS writes in articles as DLinq )
so it really would work adequately to constructing mosly existent type of constructions,
which work mainly on database level of view and processing, now DSL just good(as intended) help with it ,
once no constructs exist to avoid it.
It is real enterprise solutions way.
- but !!!
no realy DB constructions (as sample) included, despite everyone will work with it!
there they will have "too much no awesome" impression.
where they can have "awesome".
If you say, it is intended for else thing,
this means that it will be nonetheless used for thing that I said - making people resulted hard and risky.
Or on pure domain language - you will still really need to work with Database - either in
explicitly connecting constructs to data or generating it -
same for else schemes - business logics, or graphics or else -
"only DSL" if bad intended working with this real fields - will be working bad in "real applications".
So if you want you well invented by idea tool, be really productive, pleasant - incorporate real features to it !
Or it is not much better then MS Visio.
where I can make any language and process their templates.