In .net, which programming model would be good for prototyping, but then reused for production (for business logic / data access levels)

In a .NET environment, that would be a good approach for rapid prototyping of a concept (i.e. development only on my PC), which can then be expanded to a product (users via LAN / WAN), BUT so that the model / code is business -logics and code for data access level can be used how?

One thought, for example, I had to do: (a) WinForms with business logic and Entity Framework level for SQL Server Express on my PC, then (b) Going to ASP.net (using business logic / data library) with SQL Server / IIS

Any comments? Other offers?

+6
c # winforms entity-framework
source share
2 answers

I would recommend trying a layered approach:

  • puts your data model and validation classes in a separate assembly
  • Add additional business logic to a separate business logic assembly.
  • put your services (WCF services or WCF services) in your own assembly

All of these basic levels are largely independent of what you choose as the interface of an interface. You can make a choice here (for example, Linq-to-SQL vs. Entity Framework for accessing data, do you need a WCF-based service level or does your application use direct access to the database?) More or less regardless of what you put on the top parts for the user interface layer.

And on top of these base builds:

  • create your user interface either as a Winforms application or as an ASP.NET web application (Webforms or MVC) (or both)

If you have layers, and if you archive them well, you can reuse most of your code and business rules.

Try to place only materials that are specific to each user interface technology (Winforms vs. ASP.NET) in these interface presentation assemblies. Keep all common business rules, validation rules, access and service levels.

And again: it seems you think that the "switch to ASP.NET" eliminates the use of WCF / WCF data services - not at all ! You can easily use data from the WCF service in an ASP.NET application. You lose nothing by overlaying layers of your business and services - they can be easily reused both in Winforms and in ASP.NET applications!

+6
source share

A few comments:

Prototyping as an approach to software development to ensure product quality can be problematic, because the very nature of prototyping can mean that the quality of software and design is not so great. Prototypes should not be excellent quality by definition.

If the goal is to get feedback from the intended client / user in the early stages, it can often be a good idea not to prototype the full vertical slices (for example, UI โ†’ Business โ†’ DB), but to work with the user interface layouts that can be used to study ideas with users . The layout is flexible and easy to change, but not fully functional, for example. has no business logic or perseverance. This approach allows users to gain an understanding of the functionality and be involved in the design and collection of requirements. As requirements change, mocks will change quickly, especially if there is no business logic or database code that needs to be changed with it. An example tool for a mocking UI is Balsamiq:

http://www.balsamiq.com/

If one of the general goals of prototyping is to research and explore various technology options, this can be done in isolation of UI layouts, and in a more abstract way, i.e. a pure research of technology, and not a prototype oriented toward satisfying the exact needs, which can change en masse. UI layouts can change a lot with user feedback, so if investigating technologies as another activity can simplify this process, there will be less communication because a lot will change at the early stage of detection and youโ€™ll have to constantly change the backend because the userโ€™s ideas The interfaces are developing so fast that they will slow you down.

In terms of accelerating the pace of software development, use third-party libraries. If you use a database for storage, look at ORM solutions that can significantly reduce the work required to develop a data access layer, for example. NHibernate. Depending on which user interface technology you are using, look at third-party libraries.

An industry-wide approach that over the years has completely replaced prototype development: Agile. He strives to address the changing needs of users, always working to provide features, but focuses on developing high-quality software using techniques such as TDD.

+1
source share

All Articles