|
Don't cross post. It's considered rude. Pick a forum and stick to it.
|
|
|
|
|
how can i combine the application with the corresponding db (like building .cab files) when i want to use it as a software package to install it on a client computer in a way that doesn't require sql server to be installed on them? the db is mssql server and it's a windows application.
--- Thanks
modified on Saturday, January 17, 2009 2:38 AM
|
|
|
|
|
You should look into using SQL Server Compact Edition: http://www.microsoft.com/sqlserver/2008/en/us/compact.aspx
|
|
|
|
|
Hi,
Can any one tell me that how can i merge two cells in datagridview??
Plse help me.
Thanks and Regards
Lijo
|
|
|
|
|
i want to set the cursor at the end of the textbox on page refresh.
i am using timer control to refresh my page.
|
|
|
|
|
You have put the same question in asp.net forum .
|
|
|
|
|
hello
is there any way for developing a small story using different srtings,, placed in unorder way.... using maximum likehood calculation..it should align in proper way....
eg: i/p : black, fox,forest,the, into ,ran ,
o/p: black fox ran into the forest
any idea to get that output,,,, from the i/p shown... pls help me
or atleast tell how to implement maximum likehood calculation through c# code
the quieter u become more u hear
|
|
|
|
|
Maximum likelihood in the way your asking would require knowledge and rules about what constitutes likelieness of word ordering in the english language. Even given an advanced, intelligent algorithm, it would be very difficult to create stories from any arbitrary input. As the number of words increases, likeliness is going to decrease along with the possibility of multiple outcomes or no outcome.
I recommend you search Wikipedia for natural language algorithms and probability distribution, and its probably best for this thread to be moved to the algorithms forum.
|
|
|
|
|
Judging from what the maximum likelihood[^] method is, it seems that either are way in over your head, or you don't know what you are asking for...
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Just as Jon pointed out the likelihood decreases as the number of words increase. In other words, as the number of words approach infinity, the likelihood becomes 0. I guess if the number of words are limited even then you would need a clever algorithm to identify all the different parts of speech and place them grammatically. Why are you doing this anyways?
|
|
|
|
|
im developing a address normalisation engine in c#
its a part of it.....
the quieter u become more u hear
|
|
|
|
|
Dear users,
How to add icon in control pannel using c#, by which we can set own application settings.
Azad Yadav
|
|
|
|
|
Hi,
When you use the CodeProject search facilities (see top of most pages here) you would easily find several relevant articles including this one[^].
|
|
|
|
|
Dear users,
I want to know how to create window user programmatically
Azad Yadav
modified on Friday, January 16, 2009 11:35 PM
|
|
|
|
|
Form frmName = new Form();
frmName.Show();
|
|
|
|
|
Hi everybody!
Is there any idea how to get new explorer menu design for my project? May I know any website I can find.?
Appreciate your help!
thx
flowerppk
|
|
|
|
|
Lets say I have a few business objects such as Customer, CustomerCollection, Order, OrderCollection, Product and ProductCollection. The Customer object will have an OrderCollection object and Order object will have ProductCollection. The Customer will know all its orders because it has an OrderCollection, now
Should each OrderCollection or Order also have a reference to Customer so they know who they belong to? For example, when you call Save() on Order object, the Order object will pass itself to DAL and DAL will need the CustomerID the Order belongs to so it can insert it into the database.
Should the Save() method of Customer only save the Customer or should it also save the orders for the customer along with the products for the customer?
Should the Load() method of CustomerCollection load all customers from the database or should it load the customers, their orders and the products which belong to the order?
Should the Load() method of CustomerCollection only get the ids of all the customers and then pass the id to Customer.Load(string id) so the customer can load itself from the database or should the CustomerCollection.Load() get all the customer records and create Customer object by calling its overloaded constructor or perhaps calling Customer.Load(f1, f2, f3, ...) and passing all the fields?
I assume there is no correct way and probably it is a matter of opinion but I just want to know which way is the best way. How do you guys do it and please do not suggest using ORM?
|
|
|
|
|
Well, it may not be the answer your looking for....but I would remove .Save() from all of your business objects entirely, and isolate all persistance logic completely within your DAL. You have the fundamental issue that I call "Blending of Concerns" (I guess it could be called an anti-pattern). You have mixed the concerns of persistance with the concerns of your business, which, while it can make the USE of your object model simple...it greatly complicates maintenance and extension.
If you are really looking for the "best" way, I would say that one of the best ways is to follow Domain Driven Design (DDD) and implement a Domain Model. Domain models are systems of business objects (entities and value objects) and some support types. Entities implement business rules, but contain absolutely no persistance logic (or, perhapse some minimal support for persistance through the use of specialized collections). Repositories encapsulate the bulk of persistance logic. Instead of calling stored procs, an Object/Relational Mapper is often used to automatically handle graph retrievals and inserts/updates/deletes of graphs of objects. You will end up with more objects by following DDD principals, but each class will be responsible for less, do less, and generally be smaller in size. Services wrap up the orchestration of loading, editing, and saving business objects with the repositories, a unit of work, and any other support types.
http://domaindrivendesign.org/
|
|
|
|
|
Interesting! However, I learned the pattern from a very successful book named C# Business Objects. The Save() method of the business object simply does this:
public void Save()
{
CustomerManager manager = new CustomerManager();
manager.Save(this);
}
The logic for object persistence is in the DAL and not in the business object. I will read about DDD but it seems as the more I read, the more I find out that it is all a matter of opinion. It took me long to learn the above pattern (known as 3 Layered or N-Layered) and I had some fuzzy areas which I wanted to polish up. But you are guiding me in a different direction which is fine but I also want to clear-up my confusion that I have in this area.
You also answered my question on the Design and Architecture forum and gave me a lot of information--and I thank you--and suggested I should use O/RM but I want to learn how to do this myself for learning purposes. I do not like abstraction unless I know what it is that is abstracted...I am curious.
|
|
|
|
|
I also read the book C# Business Objects, by Lhotka, and I implemented an architecture very similar to it (I based our custom architecture on his CSLA). It turned out to be an absolute maintenance and management disaster. Just a word of warning.
|
|
|
|
|
Jon Rista wrote: I would remove .Save() from all of your business objects entirely, and isolate all persistance logic completely within your DAL. You have the fundamental issue that I call "Blending of Concerns" (I guess it could be called an anti-pattern).
Sounds like the Active Record pattern. (Although I'd have to see the code to be sure, but it sounds like it could be).
|
|
|
|
|
Yeah, CSLA from the book 'C# Business Objects' basically an Active Record implementation. Lhotka blends a lot more concerns than persistance into his business objects, however...its like a monstrous glob of blended functionality...quite frightening when its actually put into practice.
|
|
|
|
|
Jon Rista wrote: If you are really looking for the "best" way, I would say that one of the best ways is to follow Domain Driven Design (DDD) and implement a Domain Model.
+1
I agree completly. The main problem I have seen with active record pattern is the difficulty to write tests.
BTW, Good post
|
|
|
|
|
Agreed...AR is a pain to test. I know that its one of the patterns Fowler describes in some of his books, but its really a blending of concerns that just muddies the business layer and makes maintenance and extension of a system difficult. It also breaks the cardinal rule of single responsibility.
|
|
|
|
|
What readings or books do you recommend for DDD? Is it a tough concept, how long before one can put it into practice--I know this varies from individual to individual but for someone who has extensive knowledge of OOP&D.
|
|
|
|