473,625 Members | 3,254 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1202
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 ObjectDataSourc e 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...suddenl y 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*******@disc ussions.microso ft.com> wrote in message
news:28******** *************** ***********@mic rosoft.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...suddenl y 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*******@disc ussions.microso ft.com> wrote in message
news:28******** *************** ***********@mic rosoft.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...suddenl y 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*******@disc ussions.microso ft.com> wrote in message
news:28******** *************** ***********@mic rosoft.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...suddenl y 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*******@disc ussions.microso ft.com> wrote in message
news:28******** *************** ***********@mic rosoft.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...suddenl y 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*******@disc ussions.microso ft.com> wrote in message
news:28******** *************** ***********@mic rosoft.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*******@disc ussions.microso ft.com> wrote in message
news:28******** *************** ***********@mic rosoft.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
2473
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 components in the vector) is given by the variable name veclength. That is what I _do_ understand. What I don't understand is the coding for the default constructor which includes vec=0; What does it mean for a pointer to be equal to 0? Presumably...
6
5110
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) box, 1,0,0,2 hat, 0,0,0,1 car, 3,0,0,0 This format leads to a lot of zeros in the rows which take up a lot of
9
2231
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, FILE *in, FILE *out, FILE *err); It returns 0 on success or -1 on fail.
4
2220
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 process? 2. What information contained in sn key. I gone through that it is having public key. How it is using this key to intract with client. 3. When we have to run gacutil.exe file. Whenever we
13
15547
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 HTTP level but as yet no fully useful answer. I too have been trying to call an apache/axis webservice which desires a username/password from my C# Client. (ie the equivalent of _call.setUsername("Myname") name from within a Java client proxy)...
5
1804
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 property '.fulladdress' to be the value that appears in the drop downs text section. How to I set that parameter to be the one shown inthe drop down
4
1723
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, - Programming Visual Basic by Balena (MS Press) and - Visual Basic 2005 by Willis (WROX), but they don't go into the forms design aspects and describing the various controls at all. What bookscan I get that will cover that?
1
1485
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 visual basic applicaton that runs on his server on the remote terminals. (he has two networked to his server) My question is do I now have to install visual basic on the two terminals also? Thank you in advance to anyone who can answer this for...
4
3087
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 applications into Visual Basic.Net. My managers main thought is that Visual Basic 6 is (or has!) stopped being supported by Microsoft.
3
1937
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 objects that I can iterate through relatively easily. I've included code at the bottom of this message. I can pretty easily iterate through my employee objects like so: Dim theEmployees As Employees = New Employees
0
8189
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8692
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8635
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8354
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8497
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7182
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6116
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5570
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4192
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.