473,387 Members | 1,834 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

basic asp.net 2.0 question

I'm coding my first business web app in .NET 2.0 and its only a read only web
app. I'm just pulling data from the database and allowing users to filter the
data in the grids by using dropdowns. I've been reading and seen how you can
drag and drop the controls and bind them that way, though I'm used to coding
using a business layer and datalayer. So my question is since this is only a
view only site, would it make more sense to use the new 'datasource' controls
on 05 or keep coding using a business and datalayers?

I want to use the new tools in 05 but, what is the recommended 'best
practice' way?
May 4 '06 #1
7 1187
Having created my first ASP.NET 2.0 web app recently I would say it depends
on what kind of flexibility you need. If the data in the db corresponds to
the viewed form then the SQLDataSource controls can save you a lot of time
(e.g. you don't have to create the other classes). If the data stored needs
to be translated or interpolated before it is displayed on the form then the
businees layer (with ObjectDataSource or manual binding to form fields) is
the way to go.

But you can use an SQLDataSource control and change the sql statement in the
code behind file to match the dropdown selections the user makes, so this
would be the shortcut to getting up and running.

"CSharpguy" wrote:
I'm coding my first business web app in .NET 2.0 and its only a read only web
app. I'm just pulling data from the database and allowing users to filter the
data in the grids by using dropdowns. I've been reading and seen how you can
drag and drop the controls and bind them that way, though I'm used to coding
using a business layer and datalayer. So my question is since this is only a
view only site, would it make more sense to use the new 'datasource' controls
on 05 or keep coding using a business and datalayers?

I want to use the new tools in 05 but, what is the recommended 'best
practice' way?

May 4 '06 #2
I hate those drag and drop controlls. Like you, I spend my time building a
rich business and datalayer. If it's a readonly reporting thing, then I
guess there's no harm. In my experience, larger projects tend to start off
as being "readonly" sites...suddenly you're finding yourself saying "why
didn't I model the business layer?!?!" but you know best if that's actually
gonna happen in this case..

Karl

--
http://www.openmymind.net/
http://www.fuelindustries.com/
"CSharpguy" <CS*******@discussions.microsoft.com> wrote in message
news:28**********************************@microsof t.com...
I'm coding my first business web app in .NET 2.0 and its only a read only
web
app. I'm just pulling data from the database and allowing users to filter
the
data in the grids by using dropdowns. I've been reading and seen how you
can
drag and drop the controls and bind them that way, though I'm used to
coding
using a business layer and datalayer. So my question is since this is only
a
view only site, would it make more sense to use the new 'datasource'
controls
on 05 or keep coding using a business and datalayers?

I want to use the new tools in 05 but, what is the recommended 'best
practice' way?

May 4 '06 #3
thanks guys, you both have good points.
This site is currently up and running in .NET 1.1 and for the passed 4 years
its remained the same, which is read only (reporting type). Though I like the
drag and drop controls and the time it saves, I think I'm going with the
layers, but using typed datasets, because the current web site uses alot of
the same classes are our internal web site. So this way I can create a
business layer/data layer project and share that for both web applications
and future web and windows applications

thanks
"Karl Seguin [MVP]" wrote:
I hate those drag and drop controlls. Like you, I spend my time building a
rich business and datalayer. If it's a readonly reporting thing, then I
guess there's no harm. In my experience, larger projects tend to start off
as being "readonly" sites...suddenly you're finding yourself saying "why
didn't I model the business layer?!?!" but you know best if that's actually
gonna happen in this case..

Karl

--
http://www.openmymind.net/
http://www.fuelindustries.com/
"CSharpguy" <CS*******@discussions.microsoft.com> wrote in message
news:28**********************************@microsof t.com...
I'm coding my first business web app in .NET 2.0 and its only a read only
web
app. I'm just pulling data from the database and allowing users to filter
the
data in the grids by using dropdowns. I've been reading and seen how you
can
drag and drop the controls and bind them that way, though I'm used to
coding
using a business layer and datalayer. So my question is since this is only
a
view only site, would it make more sense to use the new 'datasource'
controls
on 05 or keep coding using a business and datalayers?

I want to use the new tools in 05 but, what is the recommended 'best
practice' way?


May 4 '06 #4
if you are going to with data object classes you should look into CodeSmith
for generating patterns of code like properties for your columns etc. to save
time and drudgery

"Karl Seguin [MVP]" wrote:
I hate those drag and drop controlls. Like you, I spend my time building a
rich business and datalayer. If it's a readonly reporting thing, then I
guess there's no harm. In my experience, larger projects tend to start off
as being "readonly" sites...suddenly you're finding yourself saying "why
didn't I model the business layer?!?!" but you know best if that's actually
gonna happen in this case..

Karl

--
http://www.openmymind.net/
http://www.fuelindustries.com/
"CSharpguy" <CS*******@discussions.microsoft.com> wrote in message
news:28**********************************@microsof t.com...
I'm coding my first business web app in .NET 2.0 and its only a read only
web
app. I'm just pulling data from the database and allowing users to filter
the
data in the grids by using dropdowns. I've been reading and seen how you
can
drag and drop the controls and bind them that way, though I'm used to
coding
using a business layer and datalayer. So my question is since this is only
a
view only site, would it make more sense to use the new 'datasource'
controls
on 05 or keep coding using a business and datalayers?

I want to use the new tools in 05 but, what is the recommended 'best
practice' way?


May 4 '06 #5
CodeSmith?? whats that?

"Dabbler" wrote:
if you are going to with data object classes you should look into CodeSmith
for generating patterns of code like properties for your columns etc. to save
time and drudgery

"Karl Seguin [MVP]" wrote:
I hate those drag and drop controlls. Like you, I spend my time building a
rich business and datalayer. If it's a readonly reporting thing, then I
guess there's no harm. In my experience, larger projects tend to start off
as being "readonly" sites...suddenly you're finding yourself saying "why
didn't I model the business layer?!?!" but you know best if that's actually
gonna happen in this case..

Karl

--
http://www.openmymind.net/
http://www.fuelindustries.com/
"CSharpguy" <CS*******@discussions.microsoft.com> wrote in message
news:28**********************************@microsof t.com...
I'm coding my first business web app in .NET 2.0 and its only a read only
web
app. I'm just pulling data from the database and allowing users to filter
the
data in the grids by using dropdowns. I've been reading and seen how you
can
drag and drop the controls and bind them that way, though I'm used to
coding
using a business layer and datalayer. So my question is since this is only
a
view only site, would it make more sense to use the new 'datasource'
controls
on 05 or keep coding using a business and datalayers?

I want to use the new tools in 05 but, what is the recommended 'best
practice' way?


May 4 '06 #6
Google says: www.codesmithtools.com

"CSharpguy" wrote:
CodeSmith?? whats that?

"Dabbler" wrote:
if you are going to with data object classes you should look into CodeSmith
for generating patterns of code like properties for your columns etc. to save
time and drudgery

"Karl Seguin [MVP]" wrote:
I hate those drag and drop controlls. Like you, I spend my time building a
rich business and datalayer. If it's a readonly reporting thing, then I
guess there's no harm. In my experience, larger projects tend to start off
as being "readonly" sites...suddenly you're finding yourself saying "why
didn't I model the business layer?!?!" but you know best if that's actually
gonna happen in this case..

Karl

--
http://www.openmymind.net/
http://www.fuelindustries.com/
"CSharpguy" <CS*******@discussions.microsoft.com> wrote in message
news:28**********************************@microsof t.com...
> I'm coding my first business web app in .NET 2.0 and its only a read only
> web
> app. I'm just pulling data from the database and allowing users to filter
> the
> data in the grids by using dropdowns. I've been reading and seen how you
> can
> drag and drop the controls and bind them that way, though I'm used to
> coding
> using a business layer and datalayer. So my question is since this is only
> a
> view only site, would it make more sense to use the new 'datasource'
> controls
> on 05 or keep coding using a business and datalayers?
>
> I want to use the new tools in 05 but, what is the recommended 'best
> practice' way?
>
>

May 4 '06 #7
Without knowing the specs of your application, I cannot give you a firm
answer either way.

The drag and drop functionality will fit most read only implementations
without killing the "best practices" scenario (I disagree with my own
statement a bit, but you can always refactor to libraries and setting up
ASP.NET as pure GUI later, if the app grows). For simple edits, etc., it is
also fine. It is when you step outside of the box that you get squashed.

The main reason to go away from this model is either reuse or
maintainability. If you can reuse the business objects across multiple apps,
then the drag and drop, all in one, objects really, really suck. The same is
true if you need to extend the app, as the all in one objects become far
less maintainable.

If you head to a fairly standard business and data tier, consider ORM
products or a custom code gen for your work. This will help you if you need
schema changes and increase maintainability.

My preference is this (depends from project to project, of course);

Web app/Windows app - pure gui (bind, basic bozo validation)
Facade - translates business to GUI
Business - business type validations primarily, but ensure no bozo
validations blow up below this level, as DB blow ups are expensive
DAL - rather generic or generated
Data - this is generally sprocs on top of the DB (physical storage)

The facade is almost always necessary, IMO, esp. if you think you might ever
offer the same functionality to a smart client.
--
Gregory A. Beamer

*************************************************
Think Outside the Box!
*************************************************
"CSharpguy" <CS*******@discussions.microsoft.com> wrote in message
news:28**********************************@microsof t.com...
I'm coding my first business web app in .NET 2.0 and its only a read only
web
app. I'm just pulling data from the database and allowing users to filter
the
data in the grids by using dropdowns. I've been reading and seen how you
can
drag and drop the controls and bind them that way, though I'm used to
coding
using a business layer and datalayer. So my question is since this is only
a
view only site, would it make more sense to use the new 'datasource'
controls
on 05 or keep coding using a business and datalayers?

I want to use the new tools in 05 but, what is the recommended 'best
practice' way?

May 5 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: pauldepstein | last post by:
I am reading Grimshaw and Ortega's "C++ and Numerical Methods." They construct a vector class which contains the variable vec, a float* variable where the length of the array (number of...
6
by: DH | last post by:
I have a VERY basic question about figuring database size. I've inherited a database which is generally similar to this basic one: Item, Red, Blue, Green, Yellow (text), (int),(int),(int),(int)...
9
by: Malcolm | last post by:
After some days' hard work I am now the proud possessor of an ANSI C BASIC interpreter. The question is, how is it most useful? At the moment I have a function int basic(const char *script,...
4
by: Ramesh | last post by:
hi, Let me ask some basic questions. Can anybody explain me about the following questions: 1. When we have to create sn key? Whenever we compiled Component we have to create or it is a one time...
13
by: Pete | last post by:
I'm cross posting from mscom.webservices.general as I have received no answer there: There has been a number of recent posts requesting how to satisfactorily enable BASIC authorization at the...
5
by: Aussie Rules | last post by:
Hi, Having a mental block on this one. Have done it before but can't rack my brain on how... I have an object, with a bunch on property, and I add that object to a combo box. I want the...
4
by: MikeB | last post by:
I've been all over the net with this question, I hope I've finally found a group where I can ask about Visual Basic 2005. I'm at uni and we're working with Visual Basic 2005. I have some books, ...
1
by: frankhanretty | last post by:
Do I have to install Visual basic on the remote terminals as I did on the server? I have an visual basic 5 application running fine on my client's server and he is now networked. He wants to run the...
4
by: Chris Asaipillai | last post by:
Hi there My compay has a number of Visual Basic 6 applications which are front endeed onto either SQL Server or Microsoft Access databases. Now we are in process of planning to re-write these...
3
by: Scott Stark | last post by:
Hello, I'm trying to get a better handle on OOP programming principles in VB.NET. Forgive me if this question is sort of basic, but here's what I want to do. I have a collection of Employee...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.