Subscribe: Architecture
http://forums.asp.net/rss.aspx?ForumID=16&Mode=0
Added By: Feedage Forager Feedage Grade B rated
Language: English
Tags:
application  child application  code  context  data  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

Architecture



Discuss and debate ASP.NET application designs.



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

 



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

2016-09-27T01:50:56.06-07:00

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?

2016-09-18T16:40:44.917-07:00

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

2016-09-13T10:22:32.27-07:00

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?

Thanks

Gaurav




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

2016-09-07T14:51:03.54-07:00

Hi
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.Clear();
Response.ContentType = "text/json";
Response.Write(json);
Response.End();

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!




How to enhance the search functionality in my website

2016-06-27T12:44:42.323-07:00

Hi,

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.

Regards,

Ramesh 




some good ideas and designs for employee update page

2016-06-30T07:52:11.507-07:00

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 asp.net and vb.net.

Thanks




what is difference between DDD and TDD

2016-09-01T18:12:04.943-07:00

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

2016-08-25T10:17:39.637-07:00

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

2016-08-02T22:51:02.743-07:00

Hi,

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?

2016-08-24T19:03:02.957-07:00

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

2016-08-10T10:49:52.117-07:00

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

2015-09-29T17:33:12.85-07:00

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

2016-08-04T13:46:22.25-07:00

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;
#endregion

        //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) :
            base(sessionHelper)
        {
            _pService = pService;
            _commonService = commonService;
            session = sessionHelper.GetCurrentSessionValues();
            GetSessionValues();         
        }


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

Thanks

 




A quick question about additional projects

2016-08-02T12:59:49.333-07:00

Hi

I have a project which has a core, data, service and presentation layer (asp.net 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?

2016-07-29T03:21:41.84-07:00

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;
        }
    }
}

 

Test.DAL

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);
                connection.Open();
                SqlDataReader reader = command.ExecuteReader();
                try
                {
                    while (reader.Read())
                    {
                        user.Username = reader["Username"].ToString();
                        user.Password = reader["Password"].ToString();
                    }
                }
                finally
                {
                    reader.Close();
                }
            }

            return user;
        }
    }
}

 

Test.Data

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; }
    }
}

 

Test.WebUI

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

2016-08-01T08:54:03.41-07:00

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. 




Does asp.net SPA fits this design

2016-07-23T05:28:25.24-07:00

I'm developing an application that acts as a retirement plan tool, it reads some information from the user as input, in addition to some server parameters and then pass it to different formulas for calculations. The final results will be viewed on both charts and grids. The application will be browsed from different devices (PC, tablets, mobile),

I was thinking of an SPA to develop this, in order to give the user a friendly and efficient response time as of the calculations happen on the client side. 

Do you think this is a good choice for such a requirement? Are there any limitations when using SPA on mobile and tablets browsers? If you have other suggestions please mention.




Communicate with multiple web service dynamically

2016-07-26T08:48:35.893-07:00

Hi All,

I am looking for some advice on how I can do a piece of work I have. Basically I have multiple webservice that takes the same methods and parameters. And it is a pain to always have to get proxy classes, and change the code when a new provider is accepted and I am looking at ways to be able to add the webservice URL in my config and at runtime, be able to compile generate proxy classes and communicate with the remote machine dynamically.

As an example: I have to send data to a method Called UpdateCustomers (int id, string name,string surname,DateTime DateofBirth) to a provider and if We decide to use provider A be able to change the webservice url in config to point to A, or when we decide to change to B etc...

I am looking for hint and advice.

Regards




Architecture design of an e-commerce website

2016-07-06T10:33:58.49-07:00

Hi,

I am building an e-commerce website using AspnetCore RC2, MVC. I will have two modules: one for customers and one for company internals. The customer module is a standard e-commerce website where a customer can browser the products, put products in a shopping cart, and check out ... etc. The company internal module is a mini ERP where I can do inventory control, complaint tickets handling, sales report, ...etc. My question is pretty simple: can I put them into two projects?

I am exploring and I am not 100% sure the purpose of multiple projects within a solution. I assume my understanding is right but I would like to get some experienced opinions.

Thank you for your feedback!




Sharing dbcontext in mvc with repositories (EF 6)

2016-06-17T14:45:16.377-07:00

My question is quite simple. I have multiple repositories and a userclass where i want to share the same db context. 

I know this can be achieved trough Ninject, Autofac etc. 
But i dont know much about IOC at the moment :) 

Will this be an ideal way of doing it? 

Controller

    public class HomeController : Controller
    {        
        private Entities _context = new Entities();

        private readonly UserManager _userManager;
        private readonly IStoryRepository _storyRepository;

        public HomeController()
        {
            _userManager = new UserManager(_context);
            _storyRepository = new StoryRepository(_context);
        }

        //Disposal of dbcontext in the bottom after multiple actionresults
    }

Example of Repository and my custom usermanager

   public class StoryRepository : IStoryRepository
    {
        private Entities _context;

        public StoryRepository(Entities _context)
        {
            this._context = _context;
        }

        //Different methods to get data from db
    }
    public class UserManager
    {
        private Entities _context;

        public UserManager(Entities _context)
        {
            this._context = _context;
        }
    }

The repository and UManager are recieving the db context and it will get disposed of in controller when request has ended.

Is this a bad way of going about this??

Thank you! :)