How to create a common common .NET framework for my company?

I work for a company that writes its own business data applications when there is no good alternative. Most often this is a login screen - some screens, which are mostly SQL Server tables - some reports

In the past, they used MS Access. These are not exactly elite coders, but they basically get a way to structure the database and what they want for the user interface.

We would rather have a common login screen, menu screen, etc., which we can include in the application and get started. This should help with dev speed and maintainability.

Of course, there is more than one way to do this, and our problems seem to be based on data access. Possible options:

1) GUI datasets / table adapters, such as ASP.NET video, show how to do this. Some of us do this a lot. Good for speed dev. Sometimes data connections change without your attention. Huge method signatures (one parameter for each field in an insert or update) are error prone. Sometimes parameters are not detected properly. Dynamic parameters (for example, a report with additional filters) are very complex.

2) Extremely structured n-level style. A grid data source is a collection of objects, for example. The presentation layer invokes the static method in object A, which invokes the data access layer method, which creates an instance of A for each row returned from the database. For each field in the table, you must have get / set methods and internal and constructor variables. Each field is dialed so many times. Nothing is connected with anything. Probably superfluous for applications this simple.

3) The general tables provide all the common functions that iterate over the list of fields to dynamically create UPDATE and INSERT statements. Selects mainly the type SELECT *. Rapid development, but the lack of a strong set scares me. SQL Injection land mines seem to be everywhere, but I'm sure double quotation marks are all it takes to avoid this.

There should be more options, but I do not know what it is. Do you have any suggestions for me / us?

+4
source share
6 answers

Have you viewed Dynamic Data ? This is awesome for a beautiful, clean CRUD CR solution with almost no investment of time (if the database structure is structured properly).

You can add a login screen or simply use integrated Windows authentication to ensure consistency.

In addition, the learning curve is almost nothing. I made my first website in 20 minutes to watch the video, and it's so simple, even the most basic programmer at the initial level can do it.

+5
source

Have you seen ASP.NET Dynamic Data ?

+3
source

It sounds like you are looking for some kind of tools for scaffolding. There are many of them. SubSonic has confidence.

Here is the link from MSDN

+2
source

1 and 2) Take a look at ASP.NET MVC

3) See LINQ to SQL

+1
source

Desktop adapters are ancient. Not to say that they are not yet useful, but I personally would not use them without good reason. Linq to SQL was created specifically for such a rapid development. The path is quicker to configure than datasets, and it is also much easier to query and update.

There are also Entity Framework and NHibernate, but they are more focused on larger domain-oriented applications, rather than quick and dirty data access / updates.

0
source

In this case, it seems that your problems completely eliminate data access, and you mention fairly outdated methods in the .NET space.

Have you looked at LINQ-to-SQL or LINQ to Entities ? Both of these technologies deal with most, if not all, of your problems, the latter being the only solution to these two if you are not using SQL Server based back end.

0
source

Source: https://habr.com/ru/post/1303078/


All Articles