Subscribe: Architecture
http://forums.asp.net/rss.aspx?ForumID=16&Mode=0
Added By: Feedage Forager Feedage Grade B rated
Language: English
Tags:
app  application  architecture  code  currencydef  data  layer  list  mvc  net  new  project  public  user  void  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: Fri, 02 Dec 2016 15:06:42 -0800

 



Angular2 in Core vs Conventional MVC

2016-12-02T15:06:42.74-08:00

I have moderate proficiency with ASP MVC and also feel pretty comfortable now with Core. I'm going to start a new project pretty soon that will be heavy on the visual aspects and light on backend data services. Bootstrap will be used heavily.

I'm trying to decide if I want to use Angular 2 with Core or just stick with regular MVC in Core. I tried an excellent template for Angular 2 in Core http://blog.stevensanderson.com/2016/10/04/angular2-template-for-visual-studio/ to jump start the learning process.

However, it seems to me that using Angular 2 in Core gives up a huge amount of IntelliSense benefit as lots of Angular code doesn't seem to have this support. I rely on IntelliSense very heavily as coding is only one part of my software development. It's what I love about Visual Studio.

So, my question is: even understanding some of the Angular benefits, and given that I have limited time to learn a whole new technology, is there some compelling reason to use Angular 2 in Core versus just staying with a conventional MVC development model?




Plugin architecture

2015-11-20T08:37:51.61-08:00

Hi,

I'm developing an enterprise web application that is based on ASP.NET 5 and MVC6 for .NET Framework 4.6. It consists of service and desktop applications as well as a web server application. It already has a few shared assemblies for common data structures and classes. And it already has a working plugin mechanism that allows me to load any plugin with a specific shared base class from a separate assembly into a host application.

The web application must be extensible through the same plugin system as well. So I'm looking for ideas how to build that. I have some experience with ASP.NET Web Forms and MVC from .NET 4.0 and I have read quite some articles about ASP.NET 5. So while I know how to make controllers, views, routes and configuration in a single application, I have no idea how this can be extended with a plugin system.

Plugins should be able to provide full views with the corresponding controllers, accessible through their own URL route. The route should be provided by the plugin itself so that the host application just needs to load the plugin and know nothing about its specifics. Multiple instances of a plugin can be loaded and they have their individual configuration so they could make unique routes on their own if necessary.

I think I need some form of Razor view pre-compilation to include it in a plugin assembly. I've seen such approaches for MVC 3 elsewhere but they don't seem to work anymore. Is that correct and how could I do that?

Then I think I need to tell the ASP.NET runtime about new routes, controllers and views after a plugin has been discovered and loaded. Route configuration is normally done in startup code only. Can it be altered later, too? And will the runtime find controller types in assemblies that have been dynamically loaded after startup?

Are there any articles covering such topics?




Automatic Email notification from ASP.NET with out window service or console app

2016-11-30T11:44:36.147-08:00

We have developed application in ASP.net, database is SQL server and deployed in local iis server on client environment. Currently we got new requirements to send notification email to user before 30 days of content expiration.

Client clearly said they will not install and maintain the window service or console application scheduled task on their server.

Is there any way to send the automatic notification from asp.net application? Please share your solution approach to achieve this.




Processing Uploaded Files

2016-11-29T18:44:23.49-08:00

Hello,

In our Web Forms application, we are uploading PDF files to a temporary folder on the web server.  We would then like to process the PDF files (one-by-one) and store in the database. Is it recommended to 1) Create Windows console app and schedule 2) Create a windows service and set up task scheduler 3) Use 'HangFire' like background service 

We need to actively monitor the temporary folder for any new files. When a new file arrives we need to process the file. Every new file needs to processed in its own thread/async.

Please advice and/or recommend solutions.

Thanks.




where to put cache layer

2016-11-26T17:02:27.8-08:00

Hi all,

I read an article in : http://dotnetdaily.net/tutorials/n-tier-architecture-asp-net/

So I wonder ask where to put cache layer ? Anyone has experiences give me advice ?
Thank you so much !




Ntier architecture

2016-11-26T11:31:17.513-08:00

Hi all,

I'm buiding an web application . Anyone have best tutorial about ntier architecture ? How can transform data between layers ?
Mean that i intend to build framework to re-use later but dont know where to start !

Thank you so much !




how to open method in rest web servics

2016-11-21T09:26:50.693-08:00

hi

i tray to add new method in my rest web service but when i test it it give me error

it doesn't work  when i add parameter but when i don't add parameter it work !

this is my code 

 [HttpGet]
        [ActionName("rrrr")]

        public String GetCDEF()
        {
            return "ddddddd";
        }
 
        [HttpGet]
        [ActionName("rrrr")]
        public string GetRetriveData(int s)
        {
            s = s * 3;
            return s.ToString();
}

and the apiconfig

public static class WebApiConfig
    {
        public static void Register(HttpConfiguration config)
        {
            // Web API configuration and services
            // Configure Web API to use only bearer token authentication.
            config.SuppressDefaultHostAuthentication();
            config.Filters.Add(new HostAuthenticationFilter(OAuthDefaults.AuthenticationType));

            // Web API routes
            config.MapHttpAttributeRoutes();
            config.Routes.MapHttpRoute(
              name: "ActionApi",
              routeTemplate: "api/{controller}/{Action}/{id}",
              defaults: new { id = RouteParameter.Optional }
          );
            config.Routes.MapHttpRoute(
                name: "DefaultApi",
                routeTemplate: "api/{controller}/{id}",
                defaults: new { id = RouteParameter.Optional }
            );
        }
    }




Test driven development

2016-11-02T19:21:27.813-07:00

Hi All,

Am bit confused to use TDD in N-tire app design, if it simple app okey, when it getting bigger structure it bit complex to development

I have some set of question regarding TTD.

1. Why we prefer TTD first, before get into real code design, we have to follow some rules(GWT- Given, When, Then )?

2. Usually which layer we have to write TDD?, then followed by real code.

Note: In my design has below layers

  • UI : MVC
  • Business : C# library package
  • Data access: C# library package
  • Service layer : C# library package
  • Shared code : C# library package

3. Advantage, I hope some enhancement may be small, that time we no need to go and check all scenario manually, just RUN TTD we can get how many scenarios passed and how many failed.

Thanks,




How to implement generic repository in asp.net?

2016-11-20T11:38:30.08-08:00

Hi

I want to implement generic repository pattern in an efficient way. How to implement? Below is my code

namespace FXRates_EF.Base
{
    public interface IRepository : IDisposable where T : class
    {
        List GetAll();
        T GetById(int id);
        List SearchFor(Expression> predicate);
        void Insert(T entity);
        void Delete(T entity);
        void Update(T entity);
    }
}
namespace FXRates_EF.Base
{
    public class DataRepository : IRepository where T : class
    {

        public List GetAll()
        {
            List List = new List();
            try
            {
                using(xrateEntities _entity = new xrateEntities())
                {
                    List = _entity.Set().ToList();
                }
            }
            catch(Exception ex)
            {

            }
            return List;
        }

        public T GetById(int id)
        {
            throw new NotImplementedException();
        }

        public List SearchFor(System.Linq.Expressions.Expression> predicate)
        {
            throw new NotImplementedException();
        }

        public void Insert(T entity)
        {
            throw new NotImplementedException();
        }

        public void Delete(T entity)
        {
            throw new NotImplementedException();
        }

        public void Update(T entity)
        {
            throw new NotImplementedException();
        }

        public void Dispose()
        {
            throw new NotImplementedException();
        }
    }

Below is my business layer

namespace FXRates_Business.RepositoryManager
{
    public class CurrencyDefRepository : IRepository
    {
        public List GetAll()
        {
            List lst = new List();
            // How to fetch data from CurrencyDef table using generic repository
            return lst;
        }

        public CurrencyDef GetById(int id)
        {
            CurrencyDef objCurDef = new CurrencyDef();
            return objCurDef;
        }

        public List SearchFor(System.Linq.Expressions.Expression> predicate)
        {
            List lst = new List();
            return lst;
        }

        public void Insert(CurrencyDef entity)
        {
        }

        public void Delete(CurrencyDef entity)
        {
        }

        public void Update(CurrencyDef entity)
        {
        }

        public void Dispose()
        {
        }
    }

Thanks




Want to get your opinion for my project

2016-11-24T11:41:50.1-08:00

i want to make a project which i have divided into 2 parts. 1 is asp.net website and 2nd part is windows form application, both applications are connected to same database, user can go and view data/information on website and some of the users who want just specific part of the whole application can use the windows form application. Users who use windows form application can make offline changes which will be sync to online database later when connected to internet and their data will be available on asp.net webstie. I want to make architecture in a way that i don't need to write separate code for both applications like if i am going to make login on both apps than the class which contain the method to validate user login can be used for both apps. How and what scenario should i follow for implementation? or is there already a architecture design available that i can follow, and one more thing, windows forms application may have multiple instances for single login(user)




Migrate existing asp.net application to MVC 5

2016-11-24T05:43:18.437-08:00

What is the best way to Migrate an existing Asp.Net application to MVC 5?




Three-Tier Architecture Vs Repository Pattern

2016-10-30T11:47:06.777-07:00

Hello friends! It's really been a while I posted here. Hope everything goes perfect. I've been trying to understand the repository pattern and in some cases, the three-tier architecture and repository pattern look almost same. In some cases, repository pattern is implementeded inside three-tier architecture. So my questions is:

1) Is Repository Pattern Three-Tier Architecture?
2) If not, in what way it's actually different?

I apology to ask this question. I am actually mixing these two things and would expect some advices from the experts with code samples. Please don't post any links. I've already seen some.



How to separate domain classes from EF code first layer

2016-11-01T09:37:45.03-07:00

i am trying to get control over DDD with EF code first. i saw when people work with EF code first then domain classes reside there in same classes. just see a small example. public class TestDBContext : DbContext { public TestDBContext() : base("name=TestDBContext") { } protected override void OnModelCreating(DbModelBuilder modelBuilder) { //modelBuilder.Configurations.Add(new vwCustomerConfiguration()); Database.SetInitializer(null); } public DbSet Customer { get; set; } public DbSet Addresses { get; set; } public DbSet Contacts { get; set; } public virtual DbSet vwCustomers { get; set; } public DbSet vwMyCustomers { get; set; } } customer, address, contact and all domain classes are in same project but i want to put all these domain classes in different project. just see new project hierarchy which i am thinking to implement. all project name will start with my company then do and project name here it is 1) Impex.Domain 2) Impex.Storage 3) Impex.Business 4) Impex.UI so i will have 4 layers and those are domain, Storage, Business and UI. Storage, Business and UI these 3 layer will have reference of Domain layer because these 3 layers Storage, Business and UI may use domain classes. UI will pass data to business layer and received data from business layer. business layer again will talk to Storage layer where EF code first will be implemented to interact with DB. if i can successfully complete my project following 4 layers then people should consider my project is based on DDD pattern or not ? so tell me am i thinking right way. please give all your suggestion and guidance. thanks [...]






Make a Web API backend IQueryable without exposing the data layer

2016-10-12T09:09:11.477-07:00

Hi

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?

Thanks

Stephan




Ecommerce Model

2016-10-23T14:08:45.727-07:00

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?

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!




Risk Portal Architecture & Design

2016-10-15T04:39:52.617-07:00

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.

Thanks

Rajaraman.S




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

2016-10-12T15:08:01.713-07:00

Hello,

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 asp.net, but WPF might be more robust for what I'm looking for or maybe something else entirely.

Thanks,

xyz789




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?