Re: Multilayer applications

From: SP (egatsecneserp(reverse)_at_hotmail.com)
Date: 07/25/04


Date: Sat, 24 Jul 2004 22:30:21 -0400


"Just D" <no@spam.please> wrote in message
news:8iyMc.7643$BX.720@lakeread08...
>
> > business object is not constrained in needing to contain
> > the actual "display" data, e.g Your Employee object has a EmployeeName
and
>
> Not exactly, it depends what data do you need at this moment, but you
easily
> can add a column manually and add some calculated data to this column.

Exactly my point, you need to handle that particular situation "manually". I
prefer "automatic".

> > DepartmentName properties. But
> > internally the Employee object only knows the Department key and is
really
> > calling DepartmentsCollection[key].DepartmentName to provide the
> > "display" data. Getting the same behavior from a dataset is not so easy.
I
> > like the ability to make my business objects "self serving".
>
> Not so easy?! Why? What about sql queries (and maybe subqueries) providing
a
> comprehensive information? You can join on this DepartmentKey a few tables
> getting all required stuff into additional DataSet column and reflect this
> column in the DataGrid automatically just from one database call, it's
> easier than retrieve the whole information in two or more datasets, then
> make a foreach loop every one when you need to compare two or more tables.
> In a SQL solution everyting should be solved by SQL engine itself.

I tend to disagree with this. At a certain point the complexity of what you
are doing in the
SQL engine increases and crosses into the business rules.

In the example I gave you would have a grid with the EmployeeName and their
Department.
If I want to be able to change the department using a dropdown, how easy is
that to implement using your datasets.
Once you use a join to create a dataset you can not use the dataadapter to
persist the
changes made in that dataset directly back to the database. This was the one
thing that was most frustrating
about datasets.

> > But selecting an employee from a dropdown list of 1000 employees can be
> > handled with some javascript and a hidden field.
> Yes, but these is only one solution, You can use LIKE '%!@!#!@#%' in your
> queries to get only required records by mask, you can sort them by the
> alphabet and return only required group, there are many different methods.
> You also can use browse feature of SQL queries, etc.

I was refering to this as something that can be handled "quickly" by using
viewstate on the
dropdown which will slow down the page and the postback, or can be handled
with
a hidden field and javascript and will make a much faster loading webpage.

SP



Relevant Pages

  • Re: Issues with Compact Framework VS 2005 migration
    ... We are using VB.net & SQL CE 3.0 for Device. ... We are having common code files for Desktop & device application, ... We have many issues while migration. ... SQL Queries which works fine on previous SQL CE 2.0 now does not return ...
    (microsoft.public.sqlserver.ce)
  • Re: i5 performance problems
    ... Check QSYSOPR message queue around the time the problem occurs, and see if you are getting messages like: ... Interactive usage approaching installed capacity ... Certain SQL queries over some files or tables that might not have all the necessary indexes could cause the system to build temporary indexes and this can be quite expensive in terms of CPU and I/O, and could help to push your system "over the limit" if someone is running SQL queries interactively. ...
    (comp.sys.ibm.as400.misc)
  • Component that helps generating sql code
    ... simple sql queries. ... But if I can come up with the idea, it's probably stupid ... You would get great help from intellisense by typing ... help generate the sql code, ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Guru question - at least I think so: Generate SELECT from data
    ... An SQL SELECT requires a SQL engine of some kind like JET or SQL ... > Any other Microsoft tool can generate SELECT at run time? ... >> David Sceppa ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Data Paging: How To?
    ... a dual core CPU does improve performance--it permits the OS to use ... one processor and the SQL engine to use the other. ... It's just that the SQL ... Hitchhiker's Guide to Visual Studio and SQL Server ...
    (microsoft.public.dotnet.framework.adonet)