473,398 Members | 2,368 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,398 software developers and data experts.

Coding - Best practices?

Hi,
I have been developing using C# in ASP.Net for about a year now. And have
been a programmer for about 10 years. I have learned many different things
in .NET, but still when I look at sample code fromother programmers I feel
like I am so far behind. I see them usingstuff like Interfaces,
IEnumerables, StringBuilders, etc. I have written several applications in C#
since I started, but I don't ever seem to need or use those more "Advanced"
features.

I have just been assigned a new application to build from scratch.
So this is what I am asking. Where can I find a simple list of what
I should do as I build a new application. I don't really have time
for a 300 page book. What I am looking for is something that says.
"If I were to build a new application I would do A,B,C,etc. I would
use Interfaces for this,because of this, and I would use IEnumerables here
because of this, etc." I know every application is different and you might
not need all of those for every application. But I want to start out
writting this "right" from the beginning. I don't know where people learned
all those advanced things, but I can't seem to find a diffenative web site
that explains the "right" way to do things.

Thanks for all your help. (I know it's alot to ask)

Michael
Feb 5 '07 #1
3 1354
but I can't seem to find a diffenative web site that explains the "right"
way to do things.
Thats because there is no right way to do things - only the most appropriate
way for the task that needs to be done.

Very few people know all there is to know about something like .net - they
may know loads about the framework, and then fall foul because their asp.net
app needs javascript and they dont understand that object model or their app
has to touch on a technology they have not come across. Dont worry about it,
even the best developers create crap code sometimes.

I always try to visualise the application working, like cogs in an engine.
Start from the bottom up - whats your inputs, whats your outputs - how do
your inputs get processed by business logic and pass into storage, and how
do your outputs get into the display layer, from storage through your
business layers. read some of the great articles at Scott Guthries blog -
its worth your while.
http://weblogs.asp.net/scottgu/archi...22/454436.aspx

Look at how the starter kist are assembled for guidance on how to create
good multi-tiered developments
http://msdn.microsoft.com/msdnmag/is...s/default.aspx

Also look at design patterns - they can save you a lot of work and encourage
best practice.
http://aspnet.4guysfromrolla.com/articles/062503-1.aspx

Regards

John Timney (MVP)
http://www.johntimney.com
http://www.johntimney.com/blog
"Michael" <Mi*****@discussions.microsoft.comwrote in message
news:63**********************************@microsof t.com...
Hi,
I have been developing using C# in ASP.Net for about a year now. And have
been a programmer for about 10 years. I have learned many different
things
in .NET, but still when I look at sample code fromother programmers I feel
like I am so far behind. I see them usingstuff like Interfaces,
IEnumerables, StringBuilders, etc. I have written several applications in
C#
since I started, but I don't ever seem to need or use those more
"Advanced"
features.

I have just been assigned a new application to build from scratch.
So this is what I am asking. Where can I find a simple list of what
I should do as I build a new application. I don't really have time
for a 300 page book. What I am looking for is something that says.
"If I were to build a new application I would do A,B,C,etc. I would
use Interfaces for this,because of this, and I would use IEnumerables here
because of this, etc." I know every application is different and you
might
not need all of those for every application. But I want to start out
writting this "right" from the beginning. I don't know where people
learned
all those advanced things, but I can't seem to find a diffenative web site
that explains the "right" way to do things.

Thanks for all your help. (I know it's alot to ask)

Michael

Feb 5 '07 #2

I would read this:
And a reference to read from start to finish, aka, very informative for a
bird's eye view:
*
http://msdn.microsoft.com/library/de...tml/BOAGag.asp

a few times. It gives you the options you could do your code.

You can find an example here:
http://sholliday.spaces.live.com/blog/
5/24/2006
Custom Objects/Collections and Tiered Development
I use custom business entities in my example.
However, I use DataSets to get data to and from the DAL.

Here is an important snipplet from the article. But you should read the
article,....many/several/many times.

Deploying Business Entities
Business entities are used at many different tiers in your application.
Depending on how you implement your business entities, you may need to
deploy them to multiple locations if your application spans physical tiers.
The following list describes how to deploy business entities in different
implementation scenarios:

a.. Deploying Business Entities implemented as typed DataSets. The typed
DataSet class must be accessed by the Data Access Logic Component and by the
calling application. Therefore, the recommendation is to define typed
DataSet classes in a common assembly to be deployed on multiple tiers.
b.. Deploying Business Entities implemented as custom business entity
components. The custom entity class may need to be accessed by the Data
Access Logic Component, depending on how you defined the method signatures
in the Data Access Logic Component. Follow the same recommendation as for
typed DataSets by defining custom entity classes in a common assembly to be
deployed on multiple tiers.
c.. Deploying Business Entities implemented as generic DataSets or XML
strings. Generic DataSets and XML strings do not represent a separate data
type. There are no deployment issues for business entities implemented in
these formats.
"Michael" <Mi*****@discussions.microsoft.comwrote in message
news:63**********************************@microsof t.com...
Hi,
I have been developing using C# in ASP.Net for about a year now. And have
been a programmer for about 10 years. I have learned many different
things
in .NET, but still when I look at sample code fromother programmers I feel
like I am so far behind. I see them usingstuff like Interfaces,
IEnumerables, StringBuilders, etc. I have written several applications in
C#
since I started, but I don't ever seem to need or use those more
"Advanced"
features.

I have just been assigned a new application to build from scratch.
So this is what I am asking. Where can I find a simple list of what
I should do as I build a new application. I don't really have time
for a 300 page book. What I am looking for is something that says.
"If I were to build a new application I would do A,B,C,etc. I would
use Interfaces for this,because of this, and I would use IEnumerables here
because of this, etc." I know every application is different and you
might
not need all of those for every application. But I want to start out
writting this "right" from the beginning. I don't know where people
learned
all those advanced things, but I can't seem to find a diffenative web site
that explains the "right" way to do things.

Thanks for all your help. (I know it's alot to ask)

Michael

Feb 5 '07 #3

"sloan" <sl***@ipass.netwrote in message news:...
>
I would read this:
And a reference to read from start to finish, aka, very informative for a
bird's eye view:
*
http://msdn.microsoft.com/library/de...tml/BOAGag.asp
>
a few times. It gives you the options you could do your code.

You can find an example here:
http://sholliday.spaces.live.com/blog/
5/24/2006
Custom Objects/Collections and Tiered Development
I use custom business entities in my example.
However, I use DataSets to get data to and from the DAL.

Here is an important snipplet from the article. But you should read the
article,....many/several/many times.

Deploying Business Entities
Business entities are used at many different tiers in your application.
Depending on how you implement your business entities, you may need to
deploy them to multiple locations if your application spans physical
tiers.
The following list describes how to deploy business entities in different
implementation scenarios:

a.. Deploying Business Entities implemented as typed DataSets. The typed
DataSet class must be accessed by the Data Access Logic Component and by
the
calling application. Therefore, the recommendation is to define typed
DataSet classes in a common assembly to be deployed on multiple tiers.
b.. Deploying Business Entities implemented as custom business entity
components. The custom entity class may need to be accessed by the Data
Access Logic Component, depending on how you defined the method signatures
in the Data Access Logic Component. Follow the same recommendation as for
typed DataSets by defining custom entity classes in a common assembly to
be
deployed on multiple tiers.
c.. Deploying Business Entities implemented as generic DataSets or XML
strings. Generic DataSets and XML strings do not represent a separate data
type. There are no deployment issues for business entities implemented in
these formats.
"Michael" <Mi*****@discussions.microsoft.comwrote in message
news:63**********************************@microsof t.com...
Hi,
I have been developing using C# in ASP.Net for about a year now. And
have
been a programmer for about 10 years. I have learned many different
things
in .NET, but still when I look at sample code fromother programmers I
feel
like I am so far behind. I see them usingstuff like Interfaces,
IEnumerables, StringBuilders, etc. I have written several applications
in
C#
since I started, but I don't ever seem to need or use those more
"Advanced"
features.

I have just been assigned a new application to build from scratch.
So this is what I am asking. Where can I find a simple list of what
I should do as I build a new application. I don't really have time
for a 300 page book. What I am looking for is something that says.
"If I were to build a new application I would do A,B,C,etc. I would
use Interfaces for this,because of this, and I would use IEnumerables
here
because of this, etc." I know every application is different and you
might
not need all of those for every application. But I want to start out
writting this "right" from the beginning. I don't know where people
learned
all those advanced things, but I can't seem to find a diffenative web
site
that explains the "right" way to do things.

Thanks for all your help. (I know it's alot to ask)

Michael


"Michael" <Mi*****@discussions.microsoft.comwrote in message
news:63**********************************@microsof t.com...
Hi,
I have been developing using C# in ASP.Net for about a year now. And have
been a programmer for about 10 years. I have learned many different
things
in .NET, but still when I look at sample code fromother programmers I feel
like I am so far behind. I see them usingstuff like Interfaces,
IEnumerables, StringBuilders, etc. I have written several applications in
C#
since I started, but I don't ever seem to need or use those more
"Advanced"
features.

I have just been assigned a new application to build from scratch.
So this is what I am asking. Where can I find a simple list of what
I should do as I build a new application. I don't really have time
for a 300 page book. What I am looking for is something that says.
"If I were to build a new application I would do A,B,C,etc. I would
use Interfaces for this,because of this, and I would use IEnumerables here
because of this, etc." I know every application is different and you
might
not need all of those for every application. But I want to start out
writting this "right" from the beginning. I don't know where people
learned
all those advanced things, but I can't seem to find a diffenative web site
that explains the "right" way to do things.

Thanks for all your help. (I know it's alot to ask)

Michael

Feb 6 '07 #4

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

Similar topics

3
by: Isaac Rodriguez | last post by:
Hi, I am fairily new to Python, but I am really liking what I am seeing. My team is going to re-design some automation projects, and we were going to use Python as our programming language. One...
55
by: Jonas Smithson | last post by:
I've seen a few attractive multi-column sites whose geometry is based on pure CSS-P, but they're what you might call "code afficionado" sites, where the subject matter of the site is "coding...
1
by: Todd | last post by:
Does anyone know of a book for C# .NET on coding standards and guidelines? My company is in the process of defining this stuff as we move to C# .NET. I could swear I picked up a book like this...
4
by: dotNetDave | last post by:
About three weeks ago I released the first .NET coding standards book titled "VSDN Tips & Tricks .NET Coding Standards". Here is what the famous author/ speaker Deborah Kurata says about it: ...
27
by: Stuart Gerchick | last post by:
C++ Coding Standards : 101 Rules, Guidelines, and Best Practices by Herb Sutter, Andrei Alexandrescu is now a month or so away from release. What is people's opinion on this...is it going to be a...
1
by: Rasika Wijayaratne | last post by:
Hello, Can I get feedback on these .NET coding best practices please. Thanks to Konrad Rudolph and Jon Skeet for the replies to my previous post on 'Writing Properties.' Thanks in advance to all...
10
by: Ren | last post by:
Hi All, I'm still rather new at vb.net and would like to know the proper way to access private varibables in a class. Do I access the variable directly or do I use the public property? ...
7
by: Robert Seacord | last post by:
The CERT/CC has just deployed a new web site dedicated to developing secure coding standards for the C programming language, C++, and eventually other programming language. We have already...
3
by: John Dalberg | last post by:
I am looking for an ASP.NET application on CodePlex which exemplifies best practices for the following: - Use of interfaces - Seperation of the UI, business and data tiers - Data Tier that uses...
52
by: burgermeister01 | last post by:
First, let me say that this question is a rather general programming question, but the context is PHP, so I figured this group would have the most relevant insight. Anyways, this is also more of...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...
0
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...
0
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...
0
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...

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.