All the users of my system get a common Id (SystemUserId). There are predefined roles/groups in the system. One user can be belong one or more of these groups. We are populating the menu/dashboard at runtime according to logging credentials.All common details (properties) of group are stored in main table (SystemUser) and specialized details are stored in relavant tables.(Teacher/Student). My solution already has classes called, SystemUser, Teacher & Student.
Problem:My system should support new group addition. (eg-: Auditor)This should support new properties to be added to SystemUser/Teacher/Student or any other new group added by the Customer at runtime.
i want to create a centralised business or Service authendication architecture in .net. for example, we have a clients like c1, c2, c3, c4, ... etc. everybody logins seperatly as well as grouply. ie, if client "C1" logins [with login authentication] he can access c2 , c3, c4 also without login authendication. So its like a google. if we enters gmail account, we can access orkut, picasa like that.. i need the cetralised architecture.
And, client "c1" seperately asks seperately how will be the authendication architecture.
so give me the single solution for both these two scenarios. how will be the architecture for these two and how is the Data Base (Login) Structure.
recently i've studied on ADO.NET's Entity Model Framework and say 'wow' as ORM is one of the fevourite pattern i practice..but suddenly i've come to an ambiguous situation when i'm going to start. i usually follow the following 3-tier architecture..
1. UI Layer 2. BLL - business logic layer 3. DAL - Data Access Layer a. DTO / DAO b. Gateway (contains the sql query/stored procedure and connection with DB)
now when i'm going to use the Entity Model Design,where the DBML/ .edmx File should be placed? Because many a times i'm using the DBML file as DTO because of the mapped objects.. in the same time, sometimes DBML ( .edmx file in .NET 4.0) contains CRUD methods and stored procedured method as well as methods with different selection operations,- which should be in Gateway. so where the .edmx file should be placed !?!! IN DTO namespace !? or in Gateway namespace!
moreover sometimes there is no need for the BLL which breaks the rules of inter-layer-communication (UI > BLL > DAL.Gateway)! what makes me confuse is, what should be the ideal n-tier architecture when i'll use the ADO.NET Entity Model Design Framework
Assuming my application did not warrant a full blown DDD setup, would Repositories still be useful? I like the way they shield from implementation details (such as use of Entity Framework) underneath. However Repositories tend to be tied to Aggregate Roots (the concept is still a holy grail to me) by definition.
I suppose the question could also be put as such: if I have a typical 3-tier application, with a business layer facade consisting of "logical grouping" classes based on functionality (rather than aggregate roots as in DDD) such as TradingManager and ContactsManager, would it make sense to also create "logical grouping" repositories. Or perhaps a Data Access Object, which I believe is like a Repository without the aggregate root requirement. Of course I will still have a Model (EF POCOs) that will be passed up and down between the layers.
Also, is what I just described would be considered as a Transaction Script approach? It's certainly not DDD, and not Active Record. I'm not even sure if Active Record exists with EF4 like it does with Nhibernate.
I am trying to understand how others structure n-layered applications when they do not follow DDD.
know whats is happening and why its throwing an error (it does not find GetBrokenRules method because its List) but the reason i posted this question here is to ask for a better design, can anybody guide me here please?i am working on Facilities class (List..../Building/Floor) rror:Error 3System.Collections.Generic.List' does not contain a definition for 'GetBrokenRules' and no extension method 'GetBrokenRules' accepting a first argument of type 'System.Collections.Generic.List' could be found (are you missing a using directive or an assembly reference?)
designing Business Objects. What a business object class can contain ?
I have looked many sample codes and articles. Some only use properties in them. Some use private members, properties and constructoers. As more I am reading becoming more confuse.
Some sample codes that I checked were making functions in BO classes as well. what a BO class should contain and what is its purpose. Should there be functions in them as well ? If yes how they can be differentiated from Business Logic class functions.
modules is being used for some sites when they are developing. what is this module. for example, this sites has some modules; membership module,comment module etc.Are modules a diffrent application that is added to site later, or they talk about httpmodules?
also, how can i begin this module design and coding?
suggest me a good design pattern for implmenting the following? I have an object say myObject. This myObject is created using few inputs from the UI. After the creation of myObject. This object will be passed to few methods.. like method1(myObject);
method2(myObject);... method5(myObject);etc. Each methods will prepare the input for successive methods call. For example method1(myObject) will set the values necessary for the operation of method2.Then method2(myObject) will set up the values necessary for the operation of method3 and so on..Same object is used as the argument for every method calls.Which design pattern can be implemented?
what is considered a many-to-many relationship in a domain model class ? I mean how to implement a many-to-many relationship in a domain model class ? In SQL this is represented by a link table between two table but how this is represented in a domain model driven application ?
My MVC ASP.NET web application is split up like this:
Web Application Layer Views
Now, I have a view in the database called "EquipmentWithCableDetails", which contains additional useful information with the equipment details - so I create a class to model that view (in order to be able to read from it). In the code I have that works with that new class, I want to display the EquipmentDescription - but that property only exists on the Equipment class.
I visited this Link to study about Factory design pattern.http://wiki.asp.net/page.aspx/310/factory/ But i am confused about it still. What i understood is that we must use an Interface to define a class .In the interface we will give the prototype of functions and later on we will define it in concrete class. Is that simple concept is Factory design pattern ?
how a large ASP.NET webapplication can be structured / designed with "subwebs" !? In other words I want to structure a large web-application where I have a solution with more web-application projects. These projects are more or less independent "modules". One project should be a kind of frame application with shared masterpages, an shared sitemap and and a shared authentication. Later it should also be maybe possible also to integrate loosely older websites (which where written in classic ASP. ASP.NET 1.1, ASP.NET 2.0), but this not so important at the moment
I would like to provide my client with a aspx pages, with code behind provided, etc. But in some cases they will want to write their own markup - I'm thinking of having 2 directories [siblings of each other], one for the pages I provide, and the other for their custom markup. At page serve time, check to see if the client wrote their own markup and if so use it. Otherwise use the default provided.
In a nutshell I would like for my clients to be able to modify the pages I provide, but if they blow it up have a very easy way to back it out. Or to put it in a more positive light, allow them to override my pages easily.
My requirement is i need to display some quotes from some vendors in my User Interface. Some of the quote details will be fetched from database where as some vendors are giving web services to get the quote results. I need to combine the quotes from database as well as the various web service response and display in the grid.
i just want to make sure that i am folling the correct pattern and following the right practice and i have read the book (Wrox.Professional.Enterprise.dot.NET) and based on that book here is what i come-up with my design.
I'm refactoring an old website that has product search code littered throught the codebehind. I'm trying to encapsulate the search logic into its own class so I've created a Product class with a Search() method. I would like some suggestions about OO best practices so that the class is reusable and maintainable. The questions I have are:
- Should I make the search() method an instance method or make it static? For now the class is just really there to encapsulate my search logic
- If I make it an instance method should it return a list of products or should it populate a member property that I can access like p.Search(); var x = p.ProductList;
- The search method requires upward of 7 parameters of different types, what's the best way to provide them? - pass them all i.e. p.Search (param1, param2, ..., param7) - create a SearchParams structure in the class, populate it and pass that i.e. p.Search(searchParams) - Instantiate a Product object and set properties on it that are used by the Search method i.e. p.ID = 123; etc.... p.Search();
I've used variations of the above before but would like to know what's the best way.