Subscribe: Architecture
Added By: Feedage Forager Feedage Grade B rated
Language: English
app  application  code  data  database  layer  mvc  net  new  public  server  test  user  username  web application  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


Discuss and debate ASP.NET application designs.

Last Build Date: Thu, 25 Aug 2016 06:41:24 -0700


Make a Web API backend IQueryable without exposing the data layer



I have the following app architecture

Separated MVC Gui and Web API Backend that talks to the database. The communication between GUI and backend is standard REST, but the backend does not expose the database model objects directly (the backend can be used by third parties.. hence the additional abstraction layer).

This all works fine.. but a crucial bit of information was never shared between the GUI and backend team when this all was designed: The GUI uses a framework that does the searching, paging and sorting which is based on IQueryable. And what was done so far was simply fetch all data with some default filters, and then everything else (searching, sorting) was done with data already loaded from the backend. 

Needless to say that once you start dealing with large data sets, you run into performance issues.

And that's where I'm at now.. the backend can't simply expose IQueryable because the communication between backend and GUI does not use database models.. so I'm wondering if there's any other approach that would work here. What other way are there to do all the things you get from IQueryable without having to expose your database models?



Ecommerce Model


Hi all,

My boss ask me to build ecommerce model (about 10000 customers) . So my question is that what architecture suitable for medium ecommerce model ?
Thank you so much !

How to get logged on user for an web application on the server-side?


I have and Web Application (Single-Page Application) with authentication mode set to Windows. This is an application for our Intranet. A domain-user accesses the SPA where he can handle errors from our product collection. Unhandled exceptions are sent to a service (public) and details are saved to our database. The SPA is the front to this and I want domain-users to access the application without asking for their username and password.

In the SPA a user can by the click of a button send information about an error to our Team Foundation Server (TFS) and registrer the error (with details) as an bug or user story.

This works nicely when running everything locally on my computer in Visual Studio. I use Team Foundation Server Client Library to integrate with TFS. I use TFS-impersonation to make the work-item creation on behalf of the user (domain-user) requesting the command.

The problem is that when trying to get the domain-user username I only get the user of the application pool running the web application. I do not get the username I need to do the TFS-impersonation. To get the username I run this code on a page I have called "Authenticated.aspx":

 string result = "Unknown";
 var loggedOnUser = System.Security.Principal.WindowsIdentity.GetCurrent();
 if (loggedOnUser != null) {
         int index = loggedOnUser.Name.LastIndexOf("\\", StringComparison.Ordinal) + 1;
         result = loggedOnUser.Name.Substring(index);
var json = "{ \"User\" : \"" + result + "\"}";
Response.ContentType = "text/json";

This will give me the logged in user's username. I thought... But it only gives me the application-pool-user username. This is not very strange and I expected it to work this way, but I thought that setting the Authentication Mode to Windows I maybe came around it. Silly I know.

Does anyone know how to get the logged in user of an web application using server-side code?

Thanks in advance!

Risk Portal Architecture & Design


My effort is to plan to build a web based UI Application that would be a host of

a) Workflows , Workflow Definitions, Workflow Instances
b) Workflow would be a custom database driven implementation instead of standard tools like K2.NET, Windows Workflow , etc.
c) Dashboard Views /Custom Views

Idea is to to give a very singular , integrated UI Experience instead of hopping websites for viewing enterprise data something close to a Portal. Using Existing Portal Software is not a choice and we have been asked to build on ASP.NET MVC 5

Regarding Workflow, there would be Tasks which can be as simple as a button. For the Task to be performed, users might have different views that would be configurable. Each Task can execute in 2 contexts

1) Legacy App Context : wherein we will redirect to an external link (for legacy Websites, where the task be performed , since these are existing apps in the enterprise and the cost to change is not something we will get approval.
2) New App Context /Tasks- we can host pluggable views like partial ASP.NET MVC Views in one Single .NET UI Project , since these task views are yet to be created.

Question is over option #2 ( New App Tasks ) , since App's can be across many businesses in the enterprise.

Regarding #2, i propose the following choices
1) There would be Application specific WebAPI's , and app Specific Task Views that are all in one UI Project ( that can consome app Specific webAPI's), so that we can better control view injections, navigation and give a single page app experience
2) Host each of these Tasks Views as a separate Web Application ( like RCQ, RLU) with its own App Pools. This would mean hopping multiple websites for performing one workflow.

Which do you think will give a

1) Better UI Experience 2) Will endore UX Design Principles , etc.



What is the best solution to resolve this issue? ASP or WPF?



I hope I am in the right forum. If not... maybe somebody can lead me in the right direction.  

I had a somewhat simple or general question regarding which Microsoft technology to use.

While working for a company using forms that are constantly changing due to new state and federal laws.

A lot of forms we use are electronic, and every time there is a change we have to go into code and make the change(s).

I would like to create something like a content management app that can help us manage the forms a little faster and make life a lot easier.

I know I don't have all the requirements, and there are tons of questions to ask me, but I was looking for some guidance on what might be the best technology to use.

Our current forms are web based using, but WPF might be more robust for what I'm looking for or maybe something else entirely.



Cetain pages loading slower on company web app on virtual located outside of firewall


The company website production is hosted outside our firewall due to nature of the business for access reasons. The test server is inside the firewall. The performance for certain pages loading a lot slower on production outside of the firewall versus inside. 

How much of a factor would this be for the performance?  Could anything be done to help performance? 

DDD and DB first, is domain objects needed?


I'm working on a project that is following the DB first approach and EF is used for persistance. So we have an edmx file that generates the entity objects, but on top of that we are creating Domain Objects classes that maps to the EF objects which in turn maps to the DB. Also on top of DO we are creating DTOs that are passed to the application layer via the repository methods and those methods are accessed via the services layer from the controller actions.

I'm seeing that the DO objects that we are creating are useless and they are nothing more than a replication of the EF classes, is this true? and what can be a better approach to design this?

How to merge WCF services into a 3 tier Architecture web application


Hi All,

Recently I have developed a web application which is based on 3 tier Architecture.

There is a Data access layer, Business Logic Layer and User Interface.

Now I want update this whole application by using WCF services in it without touching the Code I already written.

Is it possible? If yes then how and if no then what I should do?



How to enhance the search functionality in my website



I have a web site which is fully developed using html , JQuery and Web API.  There is an search functionality available in the web site. 

When users try to search. I need to make 7 or 8 API calls to collect the results. But Its delaying collecting results from different api's call and display it. 

Please suggest me , how to enhance the performance when user try to search.

Thanks in Advance.



some good ideas and designs for employee update page


Hello All,

  Do anybody have any exaples or link to some good user interface designs.......I am looking for a really good UI design for employee details update page. I am creating this page using and


what is difference between DDD and TDD


I need a good article which explain with c# sample for how to code following tdd and ddd pattern.

I need to know what is difference between them?

I need to see how ddd driven code looks like and how tdd driven code looks like?

So redirect me to few best article. Thanks

How to read with filter or selective data from Redis cache


suppose i have populate my list from sql server and i have cache that data to redis cache. now i know how to read back but if i need to only read few based on filter then how it will be possible.

i just like to know how could i filter data from redis cache at the time of reading instead of reading whole data from redis cache ?

suppose customer name start with "S" and country is UK etc multiple clause.

if possible show me how to do it with chunk of code just for a example.

Solution / project structure for SignalR server, Android/iOS app and web application with live statistics



For fun and for learning, I would like to create an ASP.NET server utlilizing SignalR (or is there a better alternative for realtime updates?). Android / iOS app should be able to connect to the server and send text messages that pops up in realtime in other connected Android / iOS apps. The server should also store these messages in a database.

In addition I want to have a web application with a real time counter of how many messages have been sent.

Android / iOS apps aside, how should I best make the server and statistics? In one web application? Maybe the server should be a standalone console?

Hopefully someone could cast a light on what might be the best approach (image)

DDD can be implemented with EF db first approach?


Just like to know domain driven design can be implemented with EF db first approach? If not possible then tell me the reason.

Post forward


Hi there,

We have a old web application that gets xml data via post requests, validates them and inserts them at a database. We are migrating to a newer application with a new database.

What I need to know is how can I keep at the old (webforms) application the validation and insertion of the data at the database as it is and also forward the request at the new application in order to validate and insert the data at the new database. For the time being the answer of the old application is enough for the sender. So we do not need to return the post result of the new application.

Thanks in advance

Using IFRAME and HttpWebRequest together


I am a newbie when it comes to C# and ASP.NET coding.  So, please bear with me.

I created two separate applications; one called "Parent" and another called "Child".

In the Parent application and inside the HTML page, I wanted to call the Child application using a ShowModalWindow.  What I wanted to show in the Modal Window was data from the parent PLUS the results from search that the Child application performs.
I accomplished this in the Parent application HTML by coding in JAVASCRIPT and $.ajax three major statements:
1.    A $.ajax POST that calls a WebMethod Method in the Child Application that receives data sent by the Parent, performs the search, AND SAVES the RESULT in SESSION variables inside of the Child Application.
2.    A ShowModalWindow to the Child Application.  When the Child application starts up, it detects the session variables created in 1 and shows a fully populated screen.
3.    A $.ajax POST to remove the SESSION variables in 1.
I want to replace these $.ajax and ShowModalWindow code with C# code.
So, I tried using HttpWebRequest functionality and an IFRAME call to do this.  This failed because the IFRAME window did not detect the SESSION variables created during the HttpWebRequest call.
So, how do I accomplish do Step 1, 2, and 3 using IFRAME?  Is there an example out there that I could see?

Database Operation Application Used Unity DI


Well  previously in one of the Web Application MVC which was a Data Driven Application 

The Application was built on VS 2013,MVC Sql Server

Well reviewing application I found few things and need to understand

There was a implementation of UnityConfig

So while going through Code on each Controllers I found out few things

#region Private fields
private readonly IAService _aService;
private readonly ICommonService _commonService;

        //Assigning the BaseContoller with session
        public UController(ISessionHelper sessionHelper, IUService uService, ICommonService commonService)
            : base(sessionHelper)
            session = sessionHelper.GetCurrentSessionValues();
            _uService = userService;
            _commonService = commonService;
        public PController(IPService pService, ICommonService commonService, ISessionHelper sessionHelper) :
            _pService = pService;
            _commonService = commonService;
            session = sessionHelper.GetCurrentSessionValues();

there is no declaration of new as this can be handled by DI I believe

so my question is 

If application is Data Driven and we are following UnitofWork/Repository pattern

Do we have any advantage going for Unity Dependency Injection ?

Any valid answers will be helpful



A quick question about additional projects



I have a project which has a core, data, service and presentation layer ( mvc), and I am building a cms now I am building the front when which at present has the same setup but different service and presentation layers, however some but not all of the service cross over, so would be ok to have differen projects for many of the services? and if so are there any downsides to having a larger number of sepate projects? and although I am the only developer at the moment wil it make any difference to having multiple developers?

Any information appriciated.

3 Tier Architecture?


I been trying to make my webapp to use 3 tier application but I'm not user if this is correct.

Test.BAL or Test.BLL

I'm not sure what supposed to be in business logic when it comes to basic CRUD operations. Basically, Test.BAL have reference to Test.Data and Test.DAL

namespace Test.BAL
    public class UserBAL
        public User GetUser()
            DbAccess db = new DbAccess();
            User user = new User();

            user = db.GetUser();

            return user;



From what I read, this layer only have reference to the Data that is pass around in the layers of the architecture and do the database operations.

namespace Test.DAL
    public class DbAccess
        public User GetUser()
            User user = new User();

            string conn = "Data Source=HOME-PC\\SQLEXPRESS;Initial Catalog=Test;Integrated Security=True;Connect Timeout=15;Encrypt=False;TrustServerCertificate=True;ApplicationIntent=ReadWrite;MultiSubnetFailover=False";

            string queryString = "SELECT Username, Password FROM [User];";

            using (SqlConnection connection = new SqlConnection(conn))
                SqlCommand command = new SqlCommand(queryString, connection);
                SqlDataReader reader = command.ExecuteReader();
                    while (reader.Read())
                        user.Username = reader["Username"].ToString();
                        user.Password = reader["Password"].ToString();

            return user;



Are all the models supposed to go in here? So in my actual webapp, the models are just for viewing? so all models in my WebUI will be ViewModel?

namespace Test.Data
    public class User
        public int UserID { get; set; }
        public string Username { get; set; }
        public string Password { get; set; }



So, this webui will have reference to BAL & Data. And can mapping done in the controller? Like map the data from BAL to the ViewModel?

public ActionResult Index()
	UserBAL userBAL = new UserBAL();
	User user = new User();

	user = userBAL.GetUser();

	return View(user);


Best pratice design for a client with MVC


Hi !

Just wondering about the best pratice design for a client with MVC.

If you have a stand alone server with the following struture: Servicelayer->BusinessLayer->DataLayer

The client is using WCF for data transfer and calling the the WCF methods that is in the ServiceLayer on the server.

What is the best practice design for the client in this case. I dont want to manipulate data in the CLIENT. Is it enough with one layer ?   like RepositoryNameOrSometing that calling the ServiceLayer methods in server. Like this:    RepositoryNameOrSometing ->Controller->View  .    It not feels like it neassary with two layers like  Repository -> Service ->Controller->View . Because I already have it on the server. 

Kind regards.