Subscribe: Architecture
http://forums.asp.net/rss.aspx?ForumID=16&Mode=0
Added By: Feedage Forager Feedage Grade A rated
Language: English
Tags:
angular  application  architecture  business  code  core  data  database  mvc  net  new  order  public  repository  web 
Rate this Feed
Rate this feedRate this feedRate this feedRate this feedRate this feed
Rate this feed 1 starRate this feed 2 starRate this feed 3 starRate this feed 4 starRate this feed 5 star

Comments (0)

Feed Details and Statistics Feed Statistics
Preview: Architecture

Architecture



Discuss and debate ASP.NET application designs.



Last Build Date: Mon, 03 Apr 2017 11:43:35 -0700

 



Anyone familiar with Code Kata?

2017-04-24T17:30:38.697-07:00

Hello, I"m trying to learn domain modeling. I wanted to know where i can get some practice. Are there any communities? Or places i can do. How do the Katas work? I've found a page here or there but it doesn't seem very well organized.

Any suggestions on what i could do? Thanks!




ASP.NET Core API/MVC solution architecture for Real-World application

2017-04-19T19:48:33.027-07:00

I know architecture questions are mostly opinion based, but I would appreciate it if you guys can glance over the structure of my project and let me know any downsides.


TestProject.Api
The web api for the application. This application references all 3 class libraries (Core, Business, Data). The StartUp.cs file will specify the TestProjectDbContext and also configure dependency injection services: ICustomerRepository, CustomerRepository - ICustomerManager, CustomerManager. This is so we can inject these into the Api controllers at run time.

TestProject.Core
This class library contains no references. It contains the Domain Models, i.e. Customer.cs. Additionally, all of the interfaces for the Repositories (Data) and Manager (Business) classes, i.e. ICustomerManager, ICustomerRepository.

TestProject.Business
This class library contains a bunch of classes with the suffix Manager. For example CustomerManager. The plan is to have this project never call the Data layer or know anything about it. Each one of the classes in here will contain all of the complex business logic. The plan is for the Api to make calls to the repository to get the params needed to call the business functions. For example, _orderRepository.GetOrderById(id), then call _orderManager.CalculateOrderTotal(order). This class library will only reference the Core project so it knows about the Domain Models and can implement the Interfaces.

TestProject.Data
This class library will have entity framework installed and will contain TestProjDbContext and a folder with all of the repositories. For example: CustomerRepository, OrderRepository, etc... It will also contain the ef Migrations folder. This class library will only reference the Core project so it knows about the Domain Models and can implement the Interfaces.

Here is a different view of it:

TestProj.Business
     CustomerManager.cs
TestProj.Core
     -Interfaces
          -Business
               ICustomerManager.cs
          -Data
               -Repositores
                    ICustomerRepository.cs
          -Models
               Customer.cs
TestProj.Data
     ArchProjDbContext.cs
     -Migrations
     -Repositories
          CustomerRepository.cs

I would like some thoughts/opinions on this architecture. The goal here is to make it so Testing will be easy and if another application were to try and hook into this it will be easy. I believe there is a benefit to having all of the Interfaces and Models in the Core project rather than the Business interfaces in the business layer and the Repository interfaces in the data layer.




develop angular app with VS2015

2017-04-18T04:34:58.893-07:00

Hi

i am very new to angular, currently i am using angular cli , i want to use VS2015 to develop angular project, how can i create angular apps with VS2015




Security on Angular/WebApi with OAuth backend services

2017-03-27T10:27:58.593-07:00

Deleted..




How to segment an existing WebForms application

2017-04-03T11:24:28.25-07:00

Hello,

I have a WebForms application running ASP.NET 4.5 on IIS 10, everything is set up as a single IIS website. The application consists of three "parts" that unforutnately were designed as a monolithic project (one application, i.e. one main dll with some class libraries). The challenge now is I'd like to migrate to some new, cool technologies like MVC, node, React.JS, maybe with ASP.NET Core. However the problem is that I don't want to write entire application from scratch, it would take too much time. I'd like to do this partially, one part (app section) at a time. IIS doesn't allow to put a new application inside an already existing application. Also if I used ASP.NET Core, I can't run it with a website that also hosts WebForms application.

It seems to me that the only solution is moving part of the application to a subdomain (and thus a separate website in IIS) or using reverse proxy (e.g. Application Request Routing in IIS) which looks rather ugly in terms of design and overhead but would allow to preserve URLs "inside" the old Web Forms app. Maybe there are some other solutions? What do you think would be the best approach here?

Once again, the goal is to be able to "upgrade" part of Web Forms application to something more fancy than Web Forms, and to avoid having to move it to a separate subdomain. Can .NET apps coexist in any way in this setup?

Many thanks for all your insights!




Difference between class method and static method, when to use which?

2017-03-31T09:51:05.577-07:00

What is the main difference between class method and class static method, does it have impact on performance when to use it?




IIS app hosting under 4.6 can you avoid Kestrel?

2017-03-31T13:56:53.007-07:00

So Im getting my arms around all the changes with .NET core and one thing that struck me is the new architecture dealing with app pools.  

After reading these two articles, Im wondering if we are being forced down this path of having our app code hosted in Kestrel and dealing with the IIS-Kestrel interactions?

https://weblog.west-wind.com/posts/2016/Jun/06/Publishing-and-Running-ASPNET-Core-Applications-with-IIS
https://weblog.west-wind.com/posts/2017/Mar/16/More-on-ASPNET-Core-Running-under-IIS

For the most part, our team will never need to host on anything other than Windows and will often need enough other libraries / services etc such as Windows Workflow, that the full framework is needed.  

Question:
Can I target the newer framework with an MVC application and still host my app with an application pool targeting the latest framework, and simply avoid Kestrel?  

Our team is perfectly happy with MVC5  and the 4.5x framework configured App pools.  Can we target 4.6x and avoid Kestrel ?  




layred application mvc sales order and linq to entity

2017-03-11T15:02:31.903-08:00

hello

i'm beginner in repository and layerd application. and  i don't inderstand well which is the interaction and the relationship between the repositories and business layer classes.

 I have a confusion between both them

Here is an example for purchaese order in 3 layers and I want to review whether correct or not, and your correction

for DataAcesslayer

repository OrderRepositolry

Namespece Dal
    {
       Public class RepositoryOrder
       {
              POrderContext context = new POrderContext ();
 
              Public IEnumrebale  GetAll ()
              {
                   Context.Orders;
              }
// Following code
       }
    }

for the item of order repositories code :

namespece Dal
{
      public class RepositoryOrderItem
      {
             POrderContext context = new POrderContext();

             public IEnumrebale GetAllItemById(Order o)
             {
                  context.OrderItems.where(i => i.OrderId == o.Id);
             }

            public OrderItem GetItemById(int id)
            {
                 context.OrderItems.Find(id);
            }
//Following code
      }
}

for businessLayer here is classOrderBLL code:

namespace BLL
{
      public class OrderBLL
      {
            RepositoryOrder repoOrder = new RepositoryOrder();
            RepositoryOrderItem repoItem = new  RepositoryOrderItem();

            public IList GetAll()
           {
               return repoOrder.GetAll();
           }

            public decimal GetPrixTotal(Order order)
           {
                var query = from item in repoItem.GetAllItemById(order)
                                 select sum(item=>item.Prix * item.Quantite);
                return query;
            }
      }  
}
  1. does the total price calculation is done at the level of repository or at the level of BLL (we can make this request linq with context in the repository)?

  2. CRUD method is done at repository and they are called at BLL from repository is it right?

  3. The where extension method or the where clause in the linq to entity query matches the business rule (will be implemented at BLL) or corresponds to the read data acess (at the repository level).

Any help, advice and good practice will be welcome

have a good day




Best layer to handle exceptions, convertions and custom errors in three tire architecture in asp.net three tire application?

2017-03-21T06:23:03.7-07:00

My architecture design:

Front end(UI): Web-services, asp.net web-forms, jQuery.

BLL: Business logic.

DAL: Accessing database.

I have classes for each table in database.

Q1. I am using date format  that is different from database. Should I handle this in BLL or UI(Web-service or jQuery)?

Q2. I have unique key for my mail-id column. If user tries to insert/update I will check for unique. I not unique I want to say user to enter unique. Now I access DAL for unique from BLL and call DAL for update/insert according to result. Now should I handle this custom errors in BLL and send error message to jQuery in JSON string or in UI(Web-service or jQuery)?

Q3. When exceptions occurs I am just throwing and handling them in jQuery error section. Is this right or should I handle them in BLL and send error messages in form of JSON string to jQuery?

I consider doing all these stuff in BLL because it is where we will have all the converting logic's like readers into objects. Am I wrong?




sales order & linq to entity

2017-03-11T13:38:37.163-08:00

hello

i'm beginner in repository and layerd application. and  i don't inderstand well which is the interaction and the relationship between the repositories and business layer classes.

 I have a confusion between both them

Here is an example for purchaese order in 3 layers and I want to review whether correct or not, and your correction

for DataAcesslayer

repository OrderRepositolry

Namespece Dal
    {
       Public class RepositoryOrder
       {
              POrderContext context = new POrderContext ();
 
              Public IEnumrebale  GetAll ()
              {
                   Context.Orders;
              }
// Following code
       }
    }

for the item of order repositories code :

namespece Dal
{
      public class RepositoryOrderItem
      {
             POrderContext context = new POrderContext();

             public IEnumrebale GetAllItemById(Order o)
             {
                  context.OrderItems.where(i => i.OrderId == o.Id);
             }

            public OrderItem GetItemById(int id)
            {
                 context.OrderItems.Find(id);
            }
//Following code
      }
}

for businessLayer here is classOrderBLL code:

namespace BLL
{
      public class OrderBLL
      {
            RepositoryOrder repoOrder = new RepositoryOrder();
            RepositoryOrderItem repoItem = new  RepositoryOrderItem();

            public IList GetAll()
           {
               return repoOrder.GetAll();
           }

            public decimal GetPrixTotal(Order order)
           {
                var query = from item in repoItem.GetAllItemById(order)
                                 select sum(item=>item.Prix * item.Quantite);
                return query;
            }
      }  
}
  1. does the total price calculation is done at the level of repository or at the level of BLL (we can make this request linq with context in the repository)?

  2. CRUD method is done at repository and they are called at BLL from repository is it right?

  3. The where extension method or the where clause in the linq to entity query matches the business rule (will be implemented at BLL) or corresponds to the read data acess (at the repository level).

have a good day




Mulitenant with dependancy Injection and IOC + Unity.MVC5

2017-03-20T13:42:30.92-07:00

Hi,

 As per requirement we need to create single instance multiple database application using the same enterprise architecture.

We have following requirements.

1. We have single database architecture and followed the UOW architecture as mentioned in link https://www.codeproject.com/articles/990492/restful-day-sharp-enterprise-level-application
2. Create a client specific database which will have clients data only. Means One application will have multiple databases.
3. Need to manage client specific connection string with UOW architecture

Thanks in advance




MVC with Angular JS or ASP .Net

2016-12-23T05:28:53.717-08:00

Hi friends,

I need to implement a project in Angular JS 2.0 , there is no mention by the client to use classic ASP.Net or MVC.

My problem is I am new to Angular as well as MVC. I wanted to know if I can use Angular with classic ASP.Net  (this will be simpler for me)  or there are constraints in this design?

I also wanted to know, how useful / easy will it be to use MVC with angular by learning it. Project will kick off in January 1st week.




How do you draw the relationship between a workflow table and the request order?

2017-02-19T10:55:39.507-08:00

Hi expert,

I am requested to come up with the database schema with relationship between tables.

Now, using the reference database, there is this workflow table which contains as follows:

ePMT_Workflow

ID int PK, not null
Status (varchar(50), not null
next-Status (varchar(50), not null
Workflow_TaskID(int, null)
Next_Workflow_TaskID(int, null)
Action(varchar(50), null)
Description(varchar(100),null)

And then this status also appears in my RequestOrder Table.

But, I can't put Status as my Foreign Key in my RequestOrder Table right ?

How should I draw the line between these 2 tables ? It is many to 1 but I am stuck cos the PK - ID doesn't appear in the Request Order Table.

Hope to get some advice. Tks.




How to set up a website for offline work for multiple users

2017-02-19T09:36:30.9-08:00

Here's an example of what I'm trying to do.

Let's say I've made a fx trading bot that uses a fx brokers website, queries the prices, and submits trades according to settings specified. It runs fine in a console application from my raspberry pi.

Now I would like to commercialize it in a website where I can have multiple users running their own instance of the bot with their own settings and have each bot run 24/7.

I'm having trouble conceptualizing the design of it to accomplish the constant, individual running of bots from a website. Each user running on it's own thread? Thread sharing? Anybody have some pointers?

I've done windows forms but not websites, and I haven't done things that require it to run even when the user isn't on it.




Windows Workflow Foundation, Sendgrid or an other for send emails.

2017-02-24T18:40:14.713-08:00

I'm building an application that will need to send e-mails and approval emails constantly. 

Should I use Sendgrid with a bus, WF or an other api?




Methodology for updating server side lists

2017-02-22T22:06:54.29-08:00

I am currently writing a ASP.Net web application that has a section for out IT department to manage users. One of the things it will do is give a checkbox list of the active directory security groups and email groups a user can be a member of. I was easily able to work out the code needed to add a user to a group when the use is first created. Now I am trying to figure out an efficient way to update the groups when a user changes, for instance the user is part of 5 groups and IT updates them to add a new group and remove them from 2 existing groups.

I have thought about just doing a blanket remove from all the groups then go back and add them back to the selected ones. I have also thought of querying to get a list of all the groups they are in now, doing a compare to a list of the selected groups, calculating out which ones where removed and which where added then doing the appropriate calls. Both these methods do not seem very efficient and potentially process intensive.

What is the more common ways a skilled/experienced developer deals with this kind of situation?




Enterprise Architecture - Question/Feedback/Suggestions

2017-02-23T02:36:04.99-08:00

We work at a very large global enterprise.  We have built numerous .NET applications using framework 4.0 and 4.5.2. 

Our business team wants us to provide them a "platform" like application. One where they can create forms and collect data. One where they can "drag & drop" workflows for these custom forms they build, all from the UI. Thus alleviating the need to have the technology team build a new app every time they need a form to collect data. They want everything to be API based, so that we can possibly allow external or internal third parties to consume and leverage the application/platform we build. They are basically trying to evaluate build VS buy. Does it make sense to build up and advance our existing apps to provide this functionality or do we buy a product off the shelf.

If we do go down the build path, our technology stack of choice is going to be .NET CORE. This will allows us to leverage a lot of our existing code base and reuse it. We will most likely use Angular or MVC Hybrid as the frontend UI.

Question:

We know how to create a dynamic form build with pure .NET code, as we have done that before. Are there any open-source plugins or tools that we can use with our .NET Core code that would allow us to easily offer the form builder and dynamic workflow builder to the business team. Are there any small JS libraries that could make this capability simpler for us to build. Rather than us build the entire functionality from the ground up.

Any and all suggestions are most welcome! (image)




Best practice to override global data with region data

2017-02-07T01:55:53.357-08:00

I have a music store application and it is used in various locations. Most of the locations have same defaults but there exist few remote regions with regional specifics and need to overwrite the defaults. Details below 
Global defaults:
Default Language = English
Popular Music = Pop
etc

Remote1 defaults:
Default Language = Spanish
Popular music = Rap

Remote2 defaults:
Default Language = Italian
Popular music = Jazz

When a Music store user logs in to the app, by default the global data is loaded into the class and then verify if user's data has to be overridden with his regional specifics. I could do this simply by loading the global defaults and then verify if the user has local specifics and then overwrite the global defaults using simple sequence of statements and if conditions. But curious to know if I could use a best OO pattern. 




Onion architecture is same as domain driven design pattern or is it totally different ?

2017-01-24T09:44:42.83-08:00

please have a look at two links

http://www.c-sharpcorner.com/article/onion-architecture-in-asp-net-core-mvc/

https://www.codeproject.com/Articles/808400/Onion-Architecture-in-ASP-Net-MVC

i read article from those links and i feel Onion architecture is same as domain driven design pattern. so please some one tell me am i right ?

thanks




Manage Unit Test with Complex Architechture

2017-02-03T11:40:51.04-08:00

Hi Experts,

I have attached overview of my application architecture (https://www.imageupload.co.uk/image/BkAE).

I have web application which is dependent on few of window application.Following are process steps.

1)Create request for process (win. appl 1) and store it into database.
2)Scheduler pick this request from database.
3)Scheduler invoke respective window application.
4)Window application process and update database.
5)Web get updated status from database and requred tables

Now, I have unit test project for web application.How can i make test case for this.

What are the standard options?

(image)