Design Patterns & UML Diagrams?

Apr 27, 2010

what are design patterns and UML diagrams with best examples. How we should use in real time scenarios. Recurring iam facing these type of questions in project round.

View 5 Replies


Similar Messages:

Architecture :: Design Patterns Vs Architectural Patterns

Jan 10, 2011

1.what is the difference between design patterns vs architectural patterns ?

2. In which situations They are preffered?

View 2 Replies

Web Forms :: Want To Use Design Patterns In .net Application?

May 17, 2010

I'm trying to build a small, web application. But I want to use desing patterns in it. So I have a question: which desing patterns do you use and why in asp.net applications?

View 11 Replies

Which Of The Two Design Patterns Should I Implement In A 3-tier .Net Application

Sep 22, 2010

I'm trying to decide which of the two factory patterns I should use in my Asp.Net applications:

1 : All DAL providers derive from same abstract base class DepartmentsProvider, which defines public interface of the class ( all the necessary CRUD methods for which derived classes (providers ) provide a concrete implementation ). BLL layer instantiates correct provider by calling DepartmentsProvider.Instance:

public abstract class DepartmentsProvider
{
static private DepartmentsProvider _instance = null;
/// <summary>[code]....

In first case we implement new provider by deriving from DepartmentsProvider class, while in second case new provider is implemented by deriving from DBProviderFactory. What are pros and cons of each implementation?

View 1 Replies

Session Facade Vs Singleton Object Design Patterns?

Mar 27, 2010

which one is better in "Session Facade Class" and "Singleton Object" design patterns in ASP.Net? Also, please state the scenarions where specific design pattern is advisable to use.

View 1 Replies

Architecture :: Design Patterns For Handling User Web Navigation And Flow?

Jan 20, 2011

Our site is expected to allow the user to do whatever they want from a number of different places. Except, that doing whatever they want really means firing off mini sequences of pages they must vist (or possibly abort from to go off to another task) before returning to their starting point. So, at any given time, the user has a list of pages they are allowed to go to, a list of pages they must go to in order to complete their task, and some end point they must eventually return to, all of which are constantly changing.

As an example, a user may choose to edit an order they placed, at which point they must step through a series of pages to edit the order. These pages to edit an order may be different based on the type of order they are editing, and they must return to whatever place they were at when they decided to start editing the order. They may also have certain options of other pages to visit during their order editing process.

I really need a good way to handle this for a large number of different scenarios, and allow it to be easily changed. Right now we are doing things like setting session variables when a user chooses an action and checking them within the page on button handlers to see what they are allowed to do or where they are allowed to go. I'd love to be able to abstract this out into something that can be easily examined in one place, or even data driven, and have some sort of navigation controller pointing them to the pages they can or must go.

View 6 Replies

Design Patterns - Singleton Behavior With Multi-user Requests In C#?

Jan 7, 2011

I need to create a singleton that would hold lots of data for a spedesign patterns - Singleton behavior with multi-user requests in ASP.NETcific user. However, I am not unclear as to what the behavior of that singleton is in regard to multi-user app requests.

Here is the scenario:

On AppStart event I want to load common data for all users (from SQL) and store it as a collection somewhere within the ASP.NET storage mechanisms.

If I store that data in the cache, I would also have to create a static property in the Global.asax that would provide access to that the data from the cache.

This is not ideal because whenever an instance of any particular page, or generic handler, or what have you tries to query this data using Linq the property has to load the data from the cache... introducing latency. I need this data to be immediately available. (think of it as about 5K rows of data stored in collection of objects...)

I was thinking to use a singleton to get that data, and store it but I don't know how it would behave between requests (and postbacks), as well as application instances, in terms of its persistence.

On PostAuthenticate event I want to get user specific data from SQL in the form of a collection. If i store it as a singleton (in a similar manner as the common data) i am not clear as to:

How is the data persisted? What is the scope of that singleton (it should be for the duration of the user session). How can I ensure that the data is immediately available to whatever needs to consume it?
What happens between post-backs to that singleton? If another user logs in would another instance of that singleton be created for that specific application instance?

View 1 Replies

Architecture :: Architecture And Design Patterns?

Mar 16, 2011

hat is the difference between Architecture and Design patterns ?

View 8 Replies

Patterns To Use When Building Complex Web UI?

Jun 24, 2010

I need to implement a wizardy, dynamic UI that uses complex validation of the style:

If A = 1, show controls B, C, D. B is required, C is not, and D is not required must be less than 30 if it is populated.

If A = 2, show controls B, D, E. B is not required, D is required but has no limits, and E is not required.

If B is not null, show controls B, D, E. B is not required, D is required but has no limits, and E is not required.

Historically, I have made my presentation layer as "dumb" as possible in that it is only responsible for capturing user input and binding it to the appropriate domain model. The domain model, in turn, contains the logic needed to validate it's state and that of any child objects, and then communicates any invalid state to the presentation layer via notifications. As such, this requirement for a highly "intelligent" UI represents a departure for me.

I think I have no choice but to construct 2 very similar class hierarchies:

one that will capture presentation business rules (i.e. what fields are visible) and control what renders in the View

one that will capture domain business rules (when field A = X, then field B should be not null and in the range of n to m) to disallow objects with an invalid state from being persisted


Sill I have far more questions than answers on my strategy moving forward. Is there a set of design patterns I can draw on to build such a dynamic UI? I do have the option of using ASP.NET MVC or WebForms, so whichever approach will produce cleaner, testable code is preferred.

View 1 Replies

How To Understand The User Patterns

Feb 18, 2010

i created an intranet based website(information Portal)...i would like to know the pages each user visits and i want track there behavior...what tools should i include..

View 2 Replies

Architecture :: .NET Web-Application Architectures / Patterns?

Jul 9, 2010

Does anybody knows good, short and slim tutorials (not here ), which describe actual/modern web-application architectures / patterns (especially for ASP.NET based (classic and MVC) applications (maybe also with embedded Silverlight components) ? How would you you design today an ASP.NET application which uses different datasources (databases, services,...) ? Background: I has been away a couple of years writing web applications, and I want to start now again. So at the moment I am a little bit unsure, how to take off and find the right starting point.

View 3 Replies

C# - Regex Pattern / Looking For The X_X Numeric Patterns?

Dec 23, 2010

I will have the following possible strings:

12_3

or

12_3+14_1+16_3-400_2

The numbers could be different, but what I'm looking for are the X_X numeric patterns. However, I need to do a replace that will search for 2_3 and NOT return the 12_3 as a valid match.

The +/-'s are arthemtic symbols, and can be any valid value. They also ARENT required (in the example of the first) .. so, I might want to check a string that just has 12_3, and if I pass in 2_3, it would NOT return a match. Only if I passed in 12_3.

This is for a C# script.

View 2 Replies

Reg: Regular Expression Patterns To Match For The Example

Nov 20, 2010

I want a regular expression patterns to match for the following example.

USER@DOMAIN.COMDOMAIN\USERUSER

I need only the USER to be extracted from those.

View 2 Replies

Auto-redirect URLs By Patterns In IIS 6?

Mar 9, 2011

I thought it should be a simple straight-forward matter but after struggling with it for too much time.

What I need is to redirect all requests for my web application that match the following pattern - "^(http://[^/]+/blogs/[^/.]+)/?$" to the path of "$1/Default.aspx".

(Using English rather than Regex: [URL]

The sub-directories in "blogs" do not physically exist, instead a 3rd party product deals with the requests to randomdir/Default.aspx", but when you go to "randomdir/" you get 404 not found, which is what I'm trying to fix.

I tried to use global.asax and also HttpHandler, but I couldn't get either of them to fire up on the requests to those 404 paths.

So, in short, what should I do to redirect paths of non-existing directories?

View 2 Replies

C# - Constructs/patterns Do You Use For Accessing State?

Feb 4, 2010

Let's say you're building something simple, like a data entry/CRUD form for working on an entity called Customer. Maybe you pass the CustomerID in via Session state.I tend to write a lot of fairly boilerplate plumbing code around handling that Session variable in a particular way. The goals vary slightly but tend to be things like:

Avoid cluttering the main flow of the page with plumbing code

Handle the back button intelligently

Remove the variable from Session and persist it to ViewState ASAP

Code defensively for failure situations where the state doesn't get passed, or is lost

Do you have a best practice for handling this situation? Do you have classes in your stack that handle this perfectly every time? Do you just call the Session variables directly? Do you use encrypted QueryString and avoid Session variables in this situation entirely in order to make the back button work a little better?Lately I've been using Properties with Session variables. Here's a simple example that I just threw together, although please keep in mind that this example would not be very tolerant of the back button:

Private ReadOnly Property CustomerID() As Integer
Get
If Me.ViewState(Constants.CustomerID) Is Nothing Then[code]....

View 1 Replies

Architecture :: EF4 With Repository And Unit Of Work Patterns?

Sep 26, 2010

I've been reading recently about EF4, and how to build an architecture for asp.net web forms application using it.

I explored using POCOs (self tracking entities), with WCF, but found out that my application will be deployed on a single box (i.e. one tier), so I started reading about logical separation of layers, and came up with the following solution:

DAL layer that contains EDMX model and EF APIs, and also generated context object.Entities DLL that holds all generated POCO entities using ADO.NET POCO entity generator. (for persistence ignorance, and decoupling entities from DAL).Business layer that contains a façade for each related group of business functions, the façade will be aware of and using DAL layer. And in each function, it will initiate context and uses different entities to carry out specific job (i.e. function).UI layer that only calls the business layer façade classes. With no awareness of DAL, but it will be aware of entities (i.e. using entities DLL), as the business layer will return results basically as entity collections.

I want to know what you think about this architecture.

I also read about an architecture that uses repository and unit of work patterns, but what I understand that context object is already implementing a UOF pattern, and also object sets are implementing repository pattern (correct me if I'm wrong), so the only advantage of using additional abstraction over them is to make the business layer communicates to my classes, not EF classes, and this is good only if the DAL strategy might change (i.e. by using another tool other than EF, which is not my plan).

View 8 Replies

Architecture :: Interaction Between UnitOfWork And Repository Patterns?

May 31, 2010

I read some article about unitOfwork and repository but i'm still confused about how they interact, and how to use them in the right way.

I'm using an addressbook project to practise on patterns (even if , likely, patterns are not usefull) without any ORM framework for persistence.

My domain objects are (at now) : AddressBook (acts as an application controller), Contact (contains information about each contact in the address book), ContactGroup (mantain collections of contact).

Should i have to use distinct repository object for contact ad contactgroup?

I thought to use a UnitOfWork for the operation about the adding/removing contact to group : the user can add existing contact to a group, create a new contact while adding it to the group or remove contact from group.

View 1 Replies

Architecture :: Factory Patterns Implemented In .Net Framework?

May 17, 2010

I am having troubles understanding the purposes of using Factory pattern, I understand Factory pattern uses Factory class that has methods to return concrete objects. But why don't I simply use new opertor to create concrete objects? Some articles suggest Factory methods could return objects of different concreate classes, I can do the same thing by using switch statement.

Also are there classes in .Net framework already implementing Factory pattern? I think that will give me a better ideas why it is useful.

View 5 Replies

Visual Studio :: Design View Is Not Able To Pull In The Application For Design?

Feb 23, 2010

can't connect to sql 2005 express sp1 and vs is also sp1. 2) Which my guess is because of the database connection not being able... design view is not able to pull in the application for design, it's as if there is no theme and css just white background and black print.

View 1 Replies

MVC 3 Application Using Ninject, Entity Framework 4 Code-First CTP 5, Patterns

Jan 24, 2011

ive tried to build some base project with above technologies. I wanted maximum flexibility and testability so i tried to use patterns along the way to make this as a base for future projects. However, it seem.something is wrong or whatever and i really need help here. So

i have two questions :1- Is there anything wrong with my current code ? Ive applied patterns correctly ?

2- Why do this code actually connect to the database, create it, but doesnt support insert even if i perform the corrects operation ? (Look at the end of the post for details about this error)

I have two entities : Comment and Review

COMMENT [Code]....

REVIEW[Code].... I built up a base repository for each of them this way :GENERIC REPOSITORY[Code]...For specific operations, i use an interface :[Code]....So i am getting the generics operations from the abstract class plus the specific operations :[Code]....As you figured out, i also use a database factory will produce the database context :DATABASE FACTORY [Code]....DISPOSABLE (Some extensions methods...)[Code]....DATABASE [Code]....And to finish, i have my unit of work....UNIT OF WORK[Code]....I also binded using Ninject the interfaces :NINJECT CONTROLLER FACTORY [Code]....however, when i call in the constructor ...[Code]....

This seem to create the database but doesnt't insert anything in the database in EF4. It seem that i may figured out the problem.. while looking at the database object.. the connection state is closed and server version throw an exception of this kind :

ServerVersion = '(((System.Data.Entity.DbContext (_database)).Database.Connection).ServerVersion' threw an exception of type 'System.InvalidOperationException'

I am doing the right things ? Is there anything wrong in what ive built ? Also if you have recommandation about the code i posted, i would be glad. I am just trying to the learn the right way for building any kind of application in MVC 3. I want a good a start.

I use :
- Entity Framework 4 Code-First CTP 5
- ASP.NET MVC 3
- Ninject as DI Container

View 4 Replies

Patterns For A Data File Based WCF REST Web Service?

Mar 15, 2011

We have an existing, proprietary data processing application that runs on one of our servers and we wish to expose it as a web service for our clients to submit jobs remotely. In essence, the system takes a set of configuration parameters and one or more data files (the number of files depends on the particular configuration template, but the normal config is 2 files). The application then takes the input files, processes them, and outputs a single result data file (all files are delimited text / CSV or tab).

We want to now expose this process as a service. Based on our current setup and existing platforms, we are fairly confident that we want to go with WCF 4.0 as the framework and likely REST for the service format, though a SOAP implementation may be required at some point.

Although I am doing a lot of reading on SOA, WCF and REST, I am interested in other thoughts on how to model this service. In particular, the one-to-many relationship of job to required files for input. It seems pretty trivial to model a "job" in REST with the standard CRUD commands. However, the predefined "job type" parameter defines the number of files that must be included. A job type of "A" might call for two input files, while "B" requires 3 before the job can run.

Given that, what is best way to model the job? Do I include the multiple files in the initial creation of the job? Do I create a job and then have an "addFile" method where by I can then upload the necessary number of files?

The jobs will then have to run asynchronously because they can take time. Once complete, is it best to then just have a status field in the job object and require the client to regularly query the system for job status, or perhaps have the client provide a URL to "ping" when the job is complete?

View 1 Replies

Why Rad Controls Design Is Not Visible At Design Time In Solution

Feb 27, 2011

I installed Rad Controls. Using that controls, I designed my application pages. At design time, the design is not visible. It shows the following error:

RadTabStrip1Failed to create designer 'Telerik.Web.UI.RadTabStrip, Telerik.Web.UI, Version=2010.1.415.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4'

View 2 Replies

Patterns For Monitoring Log4net Exception Logs From Across A Cluster Of Web Servers?

Aug 9, 2010

Are there any patterns or practices for monitoring log4net exception logs across a cluster of web servers. I have considered several options including the following:

A central database
A log file retrieval system
A service based loggin architecture

View 2 Replies

C# - Software Design & Web Service Design

Dec 30, 2010

I'm about to design my Web service API, most of the functions of my API is basically very simular to my web application. Now the question is, should I create 1 single method and reuse them for both the web application and the web service api? (This seems to be the logical solution, however its very complicated; it's much easier to duplicate the method used by the web application, and keep both separate, ie one method for the web application and one method for the web service.)

1) REUSE: one main method and reuse them for both web application and web service application (I like this but it's complicated)

WebAppMethodX --uses-->
COMMONFUNCTIONMETHOD_X
APIMethodX ---uses---->
COMMONFUNCTIONMETHOD_X
ie Commonfunctionmethod_x contains reusable set of common features
PRO: less code, less maintenance, less bugs.
CON: very complicated

2) DUPLICATE: two methods, one method for the web application and one method for the web service.

WebAppMethodX
APIMethodX
PRO: simple
CON: duplication = more code, more maintenance, more bugs!

View 4 Replies

Visual Studio :: Switching To Design View - Unable To See Design View?

Jan 5, 2010

in my project the design view is not viewed, but the project is working well and good .. the only issue is i cant see my design view ..

error stated is ""Cannot switch views: Validation (Internet Explorer 6): Element 'Style' cannot be nested within element 'td'.""

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved