Click here to Skip to main content
15,904,653 members
Home / Discussions / C#
   

C#

 
GeneralRe: I’m a c++ guy and C#’s List scares me. Pin
George L. Jackson15-Mar-06 17:54
George L. Jackson15-Mar-06 17:54 
GeneralRe: I’m a c++ guy and C#’s List scares me. Pin
Julien15-Mar-06 18:25
Julien15-Mar-06 18:25 
QuestionDatagrid help Pin
bazzanewt15-Mar-06 11:56
bazzanewt15-Mar-06 11:56 
AnswerRe: Datagrid help Pin
Robert Rohde15-Mar-06 18:28
Robert Rohde15-Mar-06 18:28 
QuestionCapture mouse with transparent forms Pin
AbyssNOLF15-Mar-06 9:37
AbyssNOLF15-Mar-06 9:37 
AnswerAny help please? Pin
AbyssNOLF17-Mar-06 5:28
AbyssNOLF17-Mar-06 5:28 
QuestionWhy will LINQ fail ? Pin
erdsah8815-Mar-06 8:47
erdsah8815-Mar-06 8:47 
QuestionWhy will LINQ fail ? Pin
erdsah8815-Mar-06 8:46
erdsah8815-Mar-06 8:46 
Microsoft tries to helping object developers to close the gap between the relational world and the object world.And they call this "object modelling approach" linQ.
Using "custom business entities" in enterprise programming with linQ might seem the best thing after "sliced bread" but it isn't.

For my part I have written my Mappers and used commercial OR/M tools.

They mostly provide the same thing.

__Read the table from the database.
___Put that into a some HELPER thing.(DAO,DAL,ORM)
____Put that into your custom business object
_____Read from your business object.(if u can Smile | :) )


I see NO REASON for this "Unnecessary Pull and Push".

Can anybody explain me why we shouldn't use a typed dataset and go to OR/M?


I hear people saying Typed dataset is really concrete and not flexible to requirement changes.
U even might lose staff when u have to regenerate it.It is far away from perfect.But with typed dataset...

1.U can easily see design time errors + intellisense

2.They also provide rich data for paging,sorting and all kinds of UI staff.

3.For requirement changes,for performance and also for JOINS u should use VIEW's in database modelling.U can also use VIEW's with typed datasets in ADO.net 2.0.really nice graphical component.

On the other hand "object modelling approach" makes NO sense.As to access a group of data,u have to create a custom collection where it is the WORST thing u can do in the business software development in terms of performance.(Arrays are evil).Such as 12 million ORDERS,can have 55 million ORDER_DETAILS and 5 million CUSTOMERS and no LAZYLOADING can help u.Object models use RAM and CPU resources which are really important in terms of performance.if u have more complicated object graph it will be slower.Some might say lets take the performance parameter out and think without it,those people see a "butterfly effect" on their project when they realize that they got to rewrite the application all over again.

So I am really hard on OO but I must admit that Object oriented modelling is a nice theory.(...an idealism that does not work in practice).
if u really go into object domain modelling.U will end up with all these things which are really not neccessary...

U have to deal with

A.identity Maps(read objects only once)
B.UnitOfWork(Transaction mechanism for your objects)
C.Topological Sort(To have right insert ,update orders)
D.Mappers(OR/M buy or build it...MS did not do objectspaces which was a cool decision)
E.Repositories(common place to retreive your collections,if u can...)
F.Specification patterns / Query objects(filtering mechanism in objects,functors anonymous methods,POEAA)
G.Metadata Techniques.(some cool SQL reuse that makes the system slow,through code generation or reflection)
H.Design Patterns like FACADE to put everything under the rug...

Do u think is it worth it?

Also at the end of the day,u will face the fact that u need performance.(as the users say so it is Google time!,they just don't wanna wait,time is more valuable than money...)

Carefully looking at your UI code behind,u can easily find out that every user interface in your application has different aspects of data.And there is no ONE most important aspect.(Like u can't love your mum more than your dad...)

Object Models are not build to have many aspects of data as when designing them OO people don't think in a tabular way,they do think in a object way which is slow as their logic is eating RAM and CPU resources which are expensive.They are trying to reinvent the RDBMS idea at runtime.So every VIEW must be differently aligned for your business application user interfaces for performance.

Yes typed dataset approach is not the BEST, but people should also know what they are getting into OR/M world.

The Failure of OO developers is that they are tend to be see OO as a GOLDEN HAMMER.But the business software development has many aspects that,it is not wise to build an "OO Domain Model" where the world is consisted of objects.if u think about it tables are also everywhere in business enviroment.Table is an abstact logic to organize big amounts of business data.Like the simpliest example is;when u go to a train station , u never see OO chart of trains,the thing u see is a table with coloumns and rows telling u where to go and when to go.


I don't mean do not use OO, we should all use OO for some UI staff, but it is just no GOLDEN HAMMER that can solve every problem.LinQ on the other hand is nothing more than an OR/M tool replacing the old idea of objectspaces.(where is it again?...)


So why do I write all these staff , to discourge c# 3.0 team ?
OfCourse not!it is a really nice attempt to try to close the gap between the RDBMS and objects.But the practice and the theory doesn't have to match in daily life of a programmer.

Microsoft should invest time and money in typed datasets, not in OR/M idealism where there is no logical end.



PS: Myth: OR/M vendors might claim if u don't do OO , u will end up with a non adaptable code,spagetti code.

:=) Adaptability is in your head,not in your code...

Smile | :)
AnswerRe: Why will LINQ fail ? Pin
Judah Gabriel Himango15-Mar-06 8:58
sponsorJudah Gabriel Himango15-Mar-06 8:58 
QuestionNew window in application Pin
conrado715-Mar-06 8:35
conrado715-Mar-06 8:35 
AnswerRe: New window in application Pin
DougW4815-Mar-06 11:05
DougW4815-Mar-06 11:05 
GeneralRe: New window in application Pin
conrado715-Mar-06 11:33
conrado715-Mar-06 11:33 
Questionclosing forms Pin
Vineet Rajan15-Mar-06 6:52
Vineet Rajan15-Mar-06 6:52 
AnswerRe: closing forms Pin
DougW4815-Mar-06 7:30
DougW4815-Mar-06 7:30 
QuestionConvert VB.NET 2005 to C#.NET 2005 Pin
yesufollower15-Mar-06 5:51
yesufollower15-Mar-06 5:51 
AnswerRe: Convert VB.NET 2005 to C#.NET 2005 Pin
Ed.Poore15-Mar-06 6:34
Ed.Poore15-Mar-06 6:34 
AnswerRe: Convert VB.NET 2005 to C#.NET 2005 Pin
Joe Woodbury15-Mar-06 7:46
professionalJoe Woodbury15-Mar-06 7:46 
AnswerRe: Convert VB.NET 2005 to C#.NET 2005 Pin
Daniel Grunwald15-Mar-06 8:27
Daniel Grunwald15-Mar-06 8:27 
AnswerRe: Convert VB.NET 2005 to C#.NET 2005 Pin
mcljava15-Mar-06 11:43
mcljava15-Mar-06 11:43 
AnswerRe: Convert VB.NET 2005 to C#.NET 2005 Pin
mcljava15-Mar-06 12:16
mcljava15-Mar-06 12:16 
AnswerRe: Convert VB.NET 2005 to C#.NET 2005 Pin
Dave Doknjas15-Mar-06 13:48
Dave Doknjas15-Mar-06 13:48 
AnswerRe: Convert VB.NET 2005 to C#.NET 2005 Pin
angelagke15-Mar-06 15:40
angelagke15-Mar-06 15:40 
QuestionTabControl Pin
Sabry190515-Mar-06 5:15
Sabry190515-Mar-06 5:15 
QuestionGarbage Collection needed? Pin
Glenn E. Lanier II15-Mar-06 4:57
Glenn E. Lanier II15-Mar-06 4:57 
AnswerRe: Garbage Collection needed? Pin
Colin Angus Mackay15-Mar-06 6:02
Colin Angus Mackay15-Mar-06 6:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.