ASP.NET UI Generation - asp.net

I'm Looking for some samples (will be better if they are open source) that enabling Programmer to Generate UI from Database.
I want to review them for the framework that i want to develop for myself.
Already i reviewed ASP.NET Dynamic Data and Nettiers.
Also i welcome your suggestions , tips , comments.

Have a look at a project I'm about to release, CodeGenerator. There is a sample project which illustrates how you can use CodeGenerator to quickly generate an entire administrative site. Have a look and let me know your thoughts.
BTW, this is just a small example of what CodeGenerator can do.

While perhaps not directly what you may want, have a look at Entity Framework Code First to let the code drive the DB model and it works well with existing databases.
Then with MVC you could use MVCScaffolding to generate your views but in this case it uses the Models not the DB directly.
It's a slightly different way than you might be looking for but it is still worth a look to help you as you look at this.

Related

is it the right way to do the project with asp.net mvc 4 and stored procedures?

Can you please spend ur time 4 this and help me as it is a big project if we do mistakes noe we will repeat the same mistake in next 3 years.
we are starting a new big project in asp.net mvc4, Html5 and CSS3 (We preffer these Because our application should target tablet, desktop, mobile).
So I feel bec its new we can better start with code first approach(latest) like first creating classes and prepare db(sql express) and deploy well and also we have support of EF migrations, So I think that way the proj become more successful and maintainable easily.
But the small concern with the manager, I dont know whether he is correct or iam wrong bec he has good experience in working but he is also new to MVC. below is my query ive explained pls look into this,
-Database with tables are ready.
-Now we have to start the project. (I think we can do code first reverse engineering and start)
But, For that our manager asked our team to prefer and write stored procedures, and use asp.net mvc 4?
My question is, is it the right way to do the project with that combination? Why am asking you is I have been watching videos/tutorials through online they never said the samples with that combination and all are saying with out using stored procedures, is it any problem like performance we will not get as we are using storedprocedures through EF OR because we are using stored procedures in backend we will get performance and maintaing easily as our PM says,
Iam totally confused???? please help me in this if you have solution.
There is no any issue using stored procedure in MVC, you can go for it. There would be worth reading this about your performance question.
If controller is not depended on the implementation of data access layer then no matter what you use whether EF or Stored procedure, you are good to go.
Darin Dimitrov already explain it about here.
That videos doesn't represend examples of using stored procedures, because they doesn't need stored procedures! All of results from SPs can be achived by EF easily and with much less effort and waisting times.
However, you should consider 3 things:
1) It seems that you all are new to EF. So, using EF is a potentially thechnical risk for your project!
2) Keep in mind that EF will cause some overhead to your app and if you're creating an app which works with huge data or should handle many requests at once, maybe it's better for you to keep going through SPs.
3) From the other hand, if you get familar with EF, it will dramatically progress your project fast and easy because of its useful abstractions and conventions.
So, first know your project, then deside which way you should go...

s#arp architecture + command and handler

This is my first time using S#arp Architecture 2.0 in a project.
There is two folders in tasks project : Commands and CommandHandlers.
I shearch about it and tried to undestand by the cookbook project what do i have to put there. I am imagining that i have to do something like it was before: a "viewToModel" function and a SaveOrUpdate in the IRepository.
Somebody can explain the "Commands and CommandHandlers" or/and give me a good documentation about it?
Thanks a lot!
Have you seen the Cookbook wiki? Using commands?
From your questions, I understand you are after some sort of CRUD functionality, in which case going for a command and handler approach might be overkill, just load the entity in your controller, copy values from the form and save it. Using commands is more suited for a Task based UI and where there is some behavior you want on the entities.

Exploring a ASP.NET website's code

I have been set a new project at work and have been given the code beforehand to give it a good look. Since time is limited, can anyone please give me the best way to get a good feel of the project. What are the things I should be looking for within the code?
Thanks.
Well, first I'd get the app running and get a sense of the functionality (the business functionality) of the application. If you're not familiar with the business functionality, keep notes on your questions.
Next examine the code. things like:
1. Database access methodology (ASP.NET Core, Linq2SQL, EF, NHibernate etc.)
2. Take a look at the database and the data model
3. Examine the areas you're not comfortable with in regards the ASP.NET/C# etc.
Keep a note of questions you have through this phase. If they want you to hit the ground running, you'll need your questions answered. Asking the right (intelligent) questions shows you've spent time examining the code (as they would expect)
Set a breakpoint at the page_load or init event handler of a page of interest and step through the code (F11) to see where it goes and what it does.

What is a good example Dynamic Data application?

I'm giving a demonstration of Dynamic Data to a bunch of geeks in two weeks time. I'm looking for a simpe, but comprehensive data model to build the application on. I basically just want to register the model and demonstrate the application, as built (scaffolded) without any customisation, to start with, demonstrating list and detail/edit/insert views, and how table relations are handled.
I'd like to avoid one of the standards, i.e. the Customer->Order-OrderItem models, and try something that would be of interest to geeks. Maybe a Srum project tracker, an or a bug tracker, something like that.
Any suggestions please?
Just take some of your own projects at work, well the database, that you think will be of interest to your audience and use that.
Another application of which I know that it uses Dynamic Data is this one: http://tailspintravel.codeplex.com/. It also integrates into an MVC application so you could show to them that both DD and MVC can work together in the same project.

Help choose a code generation tools for ASP.NET

I am new to the code generation tools and I would like to know how does a tool like LLBGen Pro compares with the Entity Framework?
On top of that my boos is really looking into a tool called CodeOnTime http://codeontime.com/default.aspx because he likes their good UI support.
I am asking here because I really want an unbiased opinion.
I am not sure if LLBGen can also generate the UI. So far all the development in the house we do it the classic way coding each layer manually. However we are in need of a fast prototyping tool.
Any advice to help me choose wisely will be much appreciated
thanks in advance.
Have you taken a look at CodeSmith Generator? It's a template based generation tool with Visual Studio integration, so by definition all templates are open source, and it has advanced features such as generate on build that keep your project up to date with your data source at all times.
Also, the CodeSmith team is about to start working on an official set of EF templates, but for now they offer several different ORM options including LINQ to SQL, NHibernate, .netTiers, CLSA, etc.
The thing is that there are code generators and object relational mappers (ORM) and code generators that do object relational mapping.
Something like NHibernate is a pure (ORM) and doesn't generate any code, it just provides you with an object persistence layer.
Llblgen is a code generator that generates code that performs the functions of an ORM but you can actually see the code and can override it with custom behaviour. Llblgen won't generate your UI for you and it isn't designed to. It's heavily focused around data access.
Then you have tools like CodeSmith or the built in T4 generator that comes with visual studio which you can use to create templates and then they will generate anything you want, provided you write your own templates. I've worked for companies that have invested thousands into writing their own templates.
Finally there are complete tools like CodeOnTime or IronSpeed which generate entire applications for you. This sounds good in theory, and is great for small CRUD type applications, but you lose a lot of flexibility with tools like these as they often have conventions which you are required to work around and once you start getting into heavy customization, tend to get in your way.
You should ask yourself:
Do I just need something for accessing my data? if so, you could use an ORM
Do I need to generate a highly customized UI? if so, you'd probably be best avoiding the tool like CodeOnTime and IronSpeed
I've used both LLBLGen and Entity Framework. In my experience, they are roughly equal in capability, especially now that Entity Framework 4 has been released. NHibernate is also in this realm and should be considered if you're looking to compare the top ORM tools for .NET.
I would recommend downloading the LLBLGenPro demo to evaluate it. According to Frans Bouma's blog, LLBLGenPro offers enhanced features not present in the out-of-the-box Entity Framework tooling built into VS.NET 2010.
ORM tools like EF and LLBLGen do not generate UI. For that you will need something like IronSpeed (not recommended, I don't like the code generated) or the IdeaBlade DevForce products, which I have not used.

Resources