Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Feb 13, 2007 10:08 PM by Sariel
Feb 13, 2007 09:25 AM|LINK
Hi, firstly thanks for the tool I hope Microsoft does include tools like this in Orcas final release, but, only if the final result produces scalable and enterprise class production code. I was burnt in the early days of data binding and some would argue
that even VS2005 data binding should still not be used in a enterprise level production application (myself included)
My question is does blinq allow for or have a BLL or does it purely create a UI on top of a DAL ? and I suppose that may answer the question of could you use the code created by Blinq as a starting point for a production class application or is it like
a demo only tool that creates a working application but to take it to the next level you have to virtually rewrite 70% of the code.
I am really sorry if I sound negative, I don't want to be, I would love to find out that this tool does create a true 3 tier application that is scalable and enterprise class. Unfortunetly I have attended to many Microsoft Visual studio releases where the
demo is drag and drop a dataset and bang the application is running to ooh and ahh's from the audience only to find that the results are far from standard code and nobody except a beginner would actually be able to use the result in a production application.
Please make me eat my words, please can I be wrong. Please can Blinq output a great 3 tier result (does not have to look fancy) but just support CRUD with
concurrency handling, and be easy to add business rules and data validation.
BLL Business Logic Layer
Feb 13, 2007 08:12 PM|LINK
Hi Sariel- thanks for the comments. Blinq does generate a 3-tier application. Of course, everyone's idea of what the "perfect" 3-tier application looks like differs, but it builds what I thought was a good way to divide up the layers. In the App_Code
directory, notice you have two files: one that's named after the database and one that's called StaticMethods. The content in the file named after your database is the DAL code. I suggest you don't mess with it too much; the attributes on it tell LINQ how
to shape data from the database and creates updates/inserts/deletes. There are certain things you can do to it, but really you're meant to mostly leave it alone. The StaticMethods file has partial classes for all the table classes in the DAL file, and in
those are the methods that make up your BLL. I put in those what I thought would be useful for displaying data on a webpage. I tried to make the code clean and readable, and it has comments about which methods are created for modification. You can add your
business logic here. You can also add whatever additional methods you like here. Go crazy; it's yours. Obviously, the pages are the UI layer.
I agree that generated DataSets are not ideal. There's nothing I want less than to wade through some XSD file to figure out how my DataSet works. Hopefully Blinq is a cleaner solution. Blinq is currently built on a beta version of LINQ, and transactions
were not supported. However, optimistic concurrency (overwrite values versus check all values) is supported in Blinq. Check out the readme to see how to alter those settings.
If you find that you want your BLL to be more tightly coupled to your UI layer for validation and error handling within the page, try running the Blinq command with the /pagedatasource command. It's an option that you can use so your BLL methods are generated
into the pages rather than into the StaticMethods file. There are lots of religious discussion about whether the BLL should be anywhere near the UI layer; I decided not to take a stand and supported both. :)
Sariel, give Blinq a try and tell me what you think. LINQ has a little ways to go before it's ready for enterprise usage, which is why Blinq doesn't have a GoLive license. But it does show a lot of the direction my team is taking for data access.
Feb 13, 2007 10:08 PM|LINK
Firstly, thanks for you quick reply.
Secondly, beauty ! Your reply is music to my ears I will certainly now install Linq and Blinq (did not want to install if I did not have some idea of what code was produced) I am excited [:D] with this news.
Only problem for you now is that I will probably join in on the post of asking when it will be ready.