|
jarajeshwaran wrote: The application will be very simple with not more than 20screens.
The underlying database will contain not more that 25tables.
That doesn't add up; I'd expect a "list"-form and a "details"-form for every entity, allowing you to browse the entire collection or edit a single entity.
jarajeshwaran wrote: Even if it is a multiuser application the number of user will not be more than 5 at a time.
The application will be used by a large number of people so bug fixing and introducing new features should be a breeze
New features could be introduced with a plugin-system, you could opt to load an assembly dynamic. There are some articles on CP explaining how to do such a thing
jarajeshwaran wrote: The app will be having basic CRUD screens and the Business logic involved will not be too complex.
So a generic CRUD-form would suffice?
jarajeshwaran wrote: The time to market of the resultant should be very less.
I'd walk away as soon as this sentence drops, without any hesitation. The TTM should [b]never[/b] be confined by the manager. Imagine you selling a house with a limited TTM: would you sell it without a roof?
--edit--
As I've been told, the houses are sometimes already sold before the drawings are even agreed upon. There seem to be special constructions to ensure that you get a roof. And that construction won't grind to a halt midterm.
jarajeshwaran wrote: I would like to know which framework or design pattern should I use to achieve the above functionality with least coding. I don't want to go with any third party tools.
The .NET framework, and databinding
I are Troll
modified on Friday, September 18, 2009 4:09 PM
|
|
|
|
|
Hi everyone,
m trying to understand design patterns .. which one to use when .. most popular ones .. most used in normal projects .. and some good examples ... im tired of vegetables and doctor examples ..
any help would be appreciated
and preferably with code
I am also in need of a big project where I can see all the things working together .. that will help a lot in understanding .. if any one can share .. that would be a great help
Thanks
Vishwjeet
|
|
|
|
|
Hi,
have a look at these[^], I trust the vegetable ones are only a minority.
|
|
|
|
|
|
Currently I have something like this. Each table in the database has a class, a select and update (includes insert) procedure and usually a bunch of GetFor##### procs (CustomerGetForRegion, CustomerGetForBranch etc).
Many table also have a view (vwCustomer) that gets all the related labels, where the customer table stores the CustomerTypeID the view gets both the CustomerTypeID and the CustomerType. So typically a view has 2-6 joins. The GetFor#### use the view.
My dilema comes when creating the classes in C#. I natirally have a Customer class with all the ID fields and possibly a couple of list<> of child objects (Addresses, Contacts etc) but what about the labels CustomerType etc.
My customer class has 2 methods, GetRecord and GetObject, fairly obvious that one gets the table and the other gets the view. Both then populate the Customer class (it has properties for the view columns that are not in the table).
I experimented with inheriting the ICustomerType but that got very ugly very quickly as all my classes have the data fields and the methods for CRUD and query in them. This left me with multiple methods and properties hiding each other.
I am now looking to split my classes into Customer and CustomerDB. One hold the data and services properties and List<> requirements and the other gets does all the DB IO.
The floor is now open for discussion, criticism and ideas.
|
|
|
|
|
I used to take the approach that an object should know how to persist itself, but now I always split the database access out into a separate object from the domain class as it seems to me to be a reasonable separation of concerns. One object knows about business logic, runtime behaviour, validation rules, etc. but does not know anything about persistence. Another object knows how to save and load to and from the persistence store, but does not know (or care) what the target classes are used for. I find this easier to work with, and it makes it easier to separate business logic and persistence logic for unit testing (if you are into that sort of thing).
Martin Fowler covered this in his Patterns of Enterprise Architecture book, where he calls it the Table Gateway pattern. Java people call it the DAO pattern, although that term has different connotations for .NET.
|
|
|
|
|
I have a DAL and then a single entity object, problem seems to be that a collection of the entity objects has one hell a lot of baggage in it.
I'm currently working through Josh Smith's[^] article on MVVM and wondering if the level of complexity is valid for LOB apps. I look at it from a down stream support aspect.
I am slowly coming around to the opinion that WPF/Silverlight is probably going to be the future UI to work with and the MVVM pattern seems to have a vote of confidence from some well respected people.
|
|
|
|
|
Hello experts,
I'm trying to design a framework for generating reports by storing the meta data in an XML.
The following are the sources (in both SQL / Oracle providers).
1) Tables/Views
2) Stored Procedures
3) OLAP Cubes
I'll write a wrapper to sync changes to these Tables/Views/SPs/Cubes so that the XML is up to date.
Tables/Views
============
The user will be able to store subset of the columns and filter criteria (1 or many) and should be able to run the same report at a later stage.
Stored Procedures
=================
Whenever the user wants to run the stored procedure, he/she will supply the parameters and get the output.
OLAP Cubes
==========
Predetermined cubes and/or cubes with specific members as parameters.
I'm thinking the following way using strategy pattern for retrieving data.
1) IReportData: Gets the report data in a dataset/cellset
2) IReportParameters: Gets report parameters (For SPs?)
3) IReportFilters: Report filters / criteria /criteria set
3) IReportSQL: The final executable SQL
4) IReportFormat: Rendering format
4) IReportRender: Final renderer
What do you guys think about this? Do you have any design pattern (s) that you would like to recommend?
Thanks,
RK.
You can never try. You either do it or you don't.
|
|
|
|
|
Hi
I have to do a project nemed "Recruitment Management System". I am in difficulty to make Different UML Diagrams. Is anyone can provide me the following diagrams for the system?
DFD Diagram (Context and Level-1)
Use Case Diagrams.
ER diagrams.
Activity Diagrams.
Sequence Diagrams.
Architectural design diagram.
Class Diagrams.
Database Design.
Deploymnet Diagram.
Test Cases for Use Cases.
|
|
|
|
|
Amir irfani wrote: Is anyone can provide me the following diagrams for the system?
Given the amount of time that your question has been sitting there, I guess not!
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Any idea how much work that represents? Even if someone had all those documents, I doubt that they would just share it.
Amir irfani wrote: I am in difficulty to make Different UML Diagrams
What exactly is it that you are having problems with? Do you want information on UML[^], or are you looking for information specific to the recruitment-domain?
|
|
|
|
|
Maybe some time studying UML would be the best place to start.
|
|
|
|
|
Hi
I have a senario in which I need to move the data from one database to another depending upon some conditions so that it will reduce some load on one database.For example we have A and B database and lets say lots of new data comes into database A daily.Now i want to put a logic so that some of infrequently used data in database A can be moved to database B on a daily basis.Once data is moved from A database to B databse data will be deleted from A thus reducing load on database A.so daily this process goes on and data from A will be moved to B.So B contains all the data that is moved from A daily and no data of previous day is overwritten on B.No data transformation is required.Will replication be helpful in this senario ?
|
|
|
|
|
do not publish the same question in two or more forums. Pick one and stick to it. Those are the rules around here.
|
|
|
|
|
In my site, there is registration fee for membership. Now the registration fee is constant so that i put it in the web config file. Sometimes the client requirement will change by add an option to edit the fee. Then I will prefer to move it into database. So i have to implement the function to get the fee regardless where it resides.
Please suggest me which design pattern is suitable for this scenario?
Thanks and regards,
Majee
|
|
|
|
|
The strategy-pattern[^], where you'd create an concrete strategy that can be replaced
"Our software isn't released, it escapes leaving a bloody trail of testers behind it."
|
|
|
|
|
Thanks Eddy, I have implemented the strategy pattern. I am afraid my classes caused little bit over kill though it is not the problem of design patterns.
Thanks and regards,
Majee
|
|
|
|
|
Hi,
I have a design question.
Certain modules in my application will behave differently depending on which state in the U.S. the user lives.
I will try to explain my question by talking about one module in particular, lets says its a sales tax module...
I am using strategy pattern to set the behavior of certain classes at runtime, in this case it depends on which state the user is in.
I have an abstract SalesTaxBase class that sets its behavior through the use of the ISalesTax interface. My concrete implementations that handle the specifics of each State's sales tax rules are called SalesTaxBehavior<state name=""> and they implement ISalesTax. Which SalesTaxBehavior class is used is determined at runtime depending on the State in the U.S. the user is in. Typical strategy pattern...
My issue is I want to release the program but I haven't completed all of the SalesTaxBehavior concrete implementations yet. My plan is to let the user download the latest module as they become available and then the program will be able to set the behavior of the SalesTaxBase class based on the newly downloaded SalesTaxBehaviorForNewMexico class.
Finally my question... How can I deploy my application so that the application sold today can call a SalesTaxBehavior class I create and the user uploads next year.
I was thinking of using a switch statement that said, if the state is Alabama use the SalesTaxBehavoirForAlabama class and so on for each SalesTaxBehavoir class I have already completed at the release date.
However the switch statement is concrete and so it won't know of any additional SalesTaxBehavior classes implemented after the initial release.
I don't want to update the original dll I only want to add additional dll's that perform the new functionality. In other words the design solution of how to add additional modules at a later date needs to be closed for modification but open for extension.
What would be a good method for updating my program to handle the latest SalesTaxBehavior class that has just be uploaded? To summarize what I need is a way so my app knows of and can call all of the modules that it currently contains and also those that will be added in the future.
What about a text or xml file that the application reads that contains the details of the added modules? Is that a common method for this kind of problem? (This just occurred to me as I was about to hit send...)
I hope I have been succinct enough; please let me know if I need to clarify anything.
|
|
|
|
|
Yes, it's possible to update the application after deployment. There are multiple ways of updating, where the simplest is a ClickOnce-installation.
Alternatively, you can load an assembly dynamically, check out what classes are defined within, and even instantiate[^] the classes of your liking. There's a CodeProject[^] article showing how to build plugins that way
|
|
|
|
|
I'm trying to build a generic filter screen for a set of reports with a similar purpose off the same database. Most reports include a CallData table, with filters like DateFrom, DateTo, DurationFrom, DurationTo, etc. So, I use controls for these to build a section of the where clause. When I run the report, I read the query text, build the where clause for the CallRecords filters, and replace a token in the query with this filter text. This works well with most reports, as most only filter on CallRecords.
Some also filter on, say, "Employees.EmployeeId in (1,2,3)", which I also built dynamically using checkbox lists presented to the user in the filter screen. My issue here is how to decide which criteria to insert into which report query. I could use attributes on the report classes, but I think that's clumsy. My currently winning candidate solution is to have a separate token for each filter in the report, so if there is no /*@@Employees@@*/ token in the report query, no employees criteria will be inserted.
Any suggestions of other means of doing this?
|
|
|
|
|
If you are using a stored proc this may help. Where @SetID is the criteria from the client, -1 can be any value. There is a neater method floating around somewhere but I have not changed mine for a decade or more. Search for 'Dynamic where clause'.
AND (ISNULL(@SetID,-1) = -1 OR FileSetID = @SetID)
Also the EmployeeID in (@List) will not work, you need a Split function that returns a resultset and then you can use an inner join or where in method.
|
|
|
|
|
Hi,
I have been trying to understand the differnce between these two concepts, however I am still a bit confused.
if I have this interface
Interface IArticleFactory {
IArticle Create(Parameter p)
}
What is the relationship beetween IArticle and IArticleFactory? Dependency, Association or none.
What is the relationship beetween Parameter P and IArticleFactory? Dependency, Association or none.
(some people show no relation at interface level)
Again
Class ArticleFactory : IArticleFactory {
IArticle Create(Parameter p) {
return IArticle = new Article(p);
}
}
What is the relationship beetween IArticle and ArticleFactory?
Dependency, Association or none.
What is the relationship beetween Article and ArticleFactory? Dependency, Association or none.
What is the relationship beetween Parameter P and ArticleFactory? Dependency, Association or none.
Thanks
Pierpaolo
|
|
|
|
|
At work a coworker has the need to automate some of his work. He has XLS files that have lots of blank columns and un-alphabetized entries in columns and he wants a version of that XLS that has been edited and adjusted and also has the ability to get appended to auotmatically later.
What way could I go about thinking how to design something to do this? What language to start in? I know there are programs out there that do this, but all I found are ones that charge and also he wouldn't be able to get the company to pay for a program to do this for him.
Any ideas/designs?
|
|
|
|
|
Hi ,
I am currently working on a big C++/COM project .
Can any one know/suggest @ the free available refactoring tools useful for refactoring.
|
|
|
|
|
Hi,
Anybody has idea how to do this?
|
|
|
|