|
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?
|
|
|
|
|
hello everybody ,
i really need ur help if you deal with a Enterprise Library Logging Application Block before
im trying to extract specific data from the log entery i use XmlLogEntry class and the output into xml file i tried to read from the xml file and it raise error that this xml is being used by another application and i dont know how to extract specifi data from that object i tried to use XML property but it also gave error i need to put Node every time the log works in another xml file becuase you know the output xml form the logging application block is invalid xml formate
public void LogFirstFOrmatter(Exception ex,int ex_priority,string title, TraceEventType type,string errormsg,int eventID)
{
XmlLogEntry myxmlLog = new XmlLogEntry();
myxmlLog.Severity = type;
myxmlLog.AddErrorMessage(errormsg);
myxmlLog.EventId = eventID;
myxmlLog.Message = ex.ToString();
myxmlLog.Priority = ex_priority;
myxmlLog.Title = title;
Logger.Write(myxmlLog);
LoadLogFile("MyLog");
}
public XDocument LoadLogFile(string name)
{
XDocument doc = new XDocument();
var tmpLog = Path.Combine(ConfigurationManager.AppSettings.Get("Path"),name);
tmpLog += ".xml";
var fileContent = string.Empty;
using (StreamReader reader = new StreamReader(tmpLog))
{
fileContent = reader.ReadToEnd();
}
doc = XDocument.Parse(fileContent);
return doc;
}
|
|
|
|
|
Did you read its documentation, this sort of usage information must be documented some where with application.
|
|
|
|
|
I am trying to communicate from my PC with a PCB using I2C. This PCB type was working but some of them are not now. I am receiving massage on my GUI control panel "I2C not connected". The problem on hardware I've found is that PIC microcontroller on PCB has 2.1v on its VSS (ground) pin. Firmware is transfered right to the PIC. I think this voltage appearing on Vss pin is creating problem. Is there any body to help me please, whether this is the problem and how to solve it please. Many thanks.
kd
|
|
|
|
|
Hi,
My apologies if I put this in the incorrect forum
I got the book on expert business objects, and they use the CSLA.NET framework. Now I read many negative reviews on this framework after buying the book And alot of people say that we should rather use DDD (Domain-Driven Design). What exactly is DDD? And why choose it above CSLA.NET? Are there any good books/online articles to read that explains this for beginners and how to implement it?
What other similar commercial/opensource frameworks are available to look at?
Has any one used CSLA.NET? And comments positive/negative?
Regards,
Brendan
|
|
|
|
|
These are two somewhat orthogonal (or complementary) items.
CSLA.NET provides a harness that eases the persistence, state snapshot, and business-rule tracking. This entire harness reflects the methodology that Lhotka uses to create his applcations. You can compare this harness-as-philosophy to Taligent's MVP harness or Clifton's Application Automation Layer. Normally, you have to buy into this lock, stock, and barrel to adopt these types of harnesses.
DDD attempts to provide a set of guidelines by which a software development team can produce in anticipated and repeatable ways the decomposition of a business model into an object-oriented structure. My exposure to this started with Coad's Domain-Neutral Component and Modelling in Color, supplemented by Nicola, et. al.'s Streamlined Object Modeling. The most recent valuable entry in this list is Evans' Domain-Driven Design: Tackling Complexity in the Heart of Software.
So, CSLA.NET embodies a philosophy regarding application construction. DDD embodies "best practices" for modeling a business domain.
The Application Automation Layer: Introduction And Design[^]
Modeling in Color[^]
Streamlined Object Modeling[^]
Domain-Driven Design[^]
"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
|
|
|
|
|
Thanks for the answer. So you would advise staying away for CSLA.NET and taking a DDD approach? There is a .NET book about DDD where the guy explains it with .NET. I am thinking of buying it. I am currently reading the CSLA.NET book. Do you use a DDD approach?
|
|
|
|
|
.NET Enthusiast wrote: So you would advise staying away for CSLA.NET and taking a DDD approach?
That's not what he said. The two items are complementary, so you should incorporate the bits of both that work for you. Possibly the best skill you can learn is how to analyse ideas, and see how they fit in a particular instance - don't blindly accept that one way or another is the only way to do things in all situations.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
I think that you need to stop worrying about the .NET focus and read more on object-oriented design. You can, then, translate that to many different OO languages. Furthermore, it will help your programming more than just learning from .NET-focused studies.
Once you do that, harnesses like CSLA.NET will make a lot more sense to you.
"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
|
|
|
|
|
Can any one help me to make a benchmark for checking CPU and RAM performance.
|
|
|
|
|
Hi All,
I would like to build a three tier application in which the DAL layer is based on the provider model design patter, and the BLL will be coded to an abstarct layer interface.
As an example in the DAL I would have
IProductsProvider class, IProducts class
ICategoriesProvider class, ICategories class
the BLL will be coded against the ProductsProvider and ICategoriesProvider.
An actual implementation of the IProductsProvider could be SQLProductsProvider or XMLProductsProvider
How is it possible to implement a similar pattern with strongly-type datasets?
As an example I would like to define a kind of strongly-typed datatable and tableadapters or datasets...
IProductsTableAdapter
IProductTable
ICategoriesTableAdapter
ICategoriesTable
and code the BLL versus these interfaces, and then have
SQLProductsTableAdapter implements IProductsTableAdapter
SQLProductsTable implements IProductsTable
this is to allow the switch of different providers without having to rewrite the BLL code.
Thanks
|
|
|
|
|
I am a OOD applier, I am working on a company that they provide two-tier (application-database) solution, I reviewed most of existing source code that most business logic are located in stored procedure, I feel that is not a good idea, and now, some colleague want to change because of difficult to maintenance but because it need change the thinking approach so some colleague become anti-OO.
Because of company solution is two-tier, is stored procedure a good approach in this environment?
P.S. Because of the vender lock-in pattern, the provided solution at least contain client application tier.
|
|
|
|
|
Putting in all Biz Logic in Stored Procedure is not a good approach.
Data Filtering logic should be put in Stored Procedure.
Whereas the Biz Logic and other data processing logic should be in Biz Layer.
I can understand your situation. It is not going to be a easy task of changing peoples mindset overnight.
However, slowly slowly once the developers sees the benefits of layered architecture, they are going to change.
My suggestion for you is to start coming up with Biz Components and changing stored procedures and then get into layered architecture for your application.
|
|
|
|
|
I would disagree with Robin, but only because of the types of apps I am currently working on. I work mostly with batch processes, not transactional data. Therefore almost all our business logic resides in stored procs. We recently tried to move some of the logic back into a c# business layer but the performance was so abysmal we went back to stored procs.
When working with large, batches on data then the database is the place for the business logic. If you are working on a transactional system, manipulating small amounts of data often then the business layer is the best option. Use the right tool for the job!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Yes, I would definitely agree. Almost all of the time we put our business logic in a C# business layer. But sometimes there is no substitute, in terms of performance, for a bit of business logic in the stored procedures.
Adam
|
|
|
|
|
Correct, I agree with you.
Sometimes we cannot afford a layered architecture. It is not practical also.
Architecture should be based on Application demand.
Thanks for pointing this out.
|
|
|
|
|
So, I'm making a program where you can input a ton of data.
I already made a new form for each type of data, but for many there are parts where you can input a variable number of entries.
Like for one kind you input some invariable data and then add any number (0, too) of data sets which all have the same amount of necessary inputs.
So far I placed a tab control in the each of the forms and inside put all the input controls.
For the variable data sets I put some controls to add the needed inputs and show them in a list view.
If you don't like one, you can remove it again.
Now I'm wondering if I should outsource the input for these data sets to a new form each, this would also make it easy to edit them and not have to remove one and then add a new one.
Considering that I already have 7 forms of different data types, each with a tab control of 3-5 pages, on each page different data to input, would the be overload for the user?
|
|
|
|
|
Hey, it would depend on the type of form. If it is related to a specific task, like filling up any application form, then its fine.
|
|
|
|
|
I ALWAYS (well 98% of the time) force the user to input via a seperate form, never in a list control. I have seen so many question here related to managing the DGV events.
The biggest issue I would see is managing the transactions if data entry across multiple screens (if this is a requirement) try and design the forms to encapsulate all the required data entry for a type.
I consider a 3-5 tab controls about the max I want to put on a single form before the poor thing has to struggle.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Thanks.
I made them small forms you can just click away with enter or escape. It was necessary to edit anything anyway.
|
|
|
|
|
I'm trying to determine what software and components, etc, to use to build a program that runs my bank accounts and budget, and I'm choosing products that would allow me the option to sell the product one day if I wanted to.
Not in the first version, but later, I'd like for it to allow an installation on a second machine to access the data and run the program using the data on the original computer. How can I build from the beginning to make this functionality as easy as possible to add later. (I am aware that Windows itself will need to allow file sharing)
Thank you.
|
|
|
|