473,785 Members | 2,792 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Programming practices question

I've got this question regarding programming and design practices. I'm
designing Newsletter module for my WebApp and I'm greenhorn in
programming.
There's a stored procedure which adds a subscriber to a DB. It outputs
subscriberID (uniqueidetifie r) if it succeeds to add them to the
database and return value of "0". When the subscriber already exists
but hasn't activated/confirmed their account it returns null for
subscriberID and return value of "1". If the subscriber exists and is
fully activated it returns null for subscriberID and return value of
"2". Here is the SP code:

create procedure Newsletter_Pend ingSubscriberAd d
@email varchar(255),
@name varchar(255) = null,
@company varchar(255)= null,
@subscriberID uniqueidentifie r output
as
set nocount on
if exists (select email from Newsletter_Subs cribers where email =
@email) return 2
if exists (select email from Newsletter_Pend ingSubscribers where email
= @email) return 1

select @subscriberID = newid()

declare @err int
insert into Newsletter_Pend ingSubscribers (subscriberid, email, [name],
company) values (@subscriberID, @email, @name, @company)
select @err = @@error if @err <0 return @err
return 0

set nocount off
GO
Now in my data layer in my App I'm trying to write method to add the
subscriber to the db. My problem is how and where to react on different
values returned from sql. The method is accessing the procedure and now
I check the Return Value. If it's 0 the method returns subscriberID and
if it's not -- it returns the Return Value.

Public Function Add(ByVal Email As String, ByVal Name As String,
ByVal Company As String)
Dim rowsAffected As Integer
Dim result As Integer
Dim parameters As SqlParameter() = { _
New SqlParameter("@ email", SqlDbType.VarCh ar, 255), _
New SqlParameter("@ name", SqlDbType.VarCh ar, 255), _
New SqlParameter("@ company", SqlDbType.VarCh ar, 255), _
New SqlParameter("@ subscriberID", SqlDbType.Uniqu eIdentifier)}

parameters(0).V alue = IIf(Len(Trim(Em ail)) = 0, DBNull.Value,
Email)
parameters(1).V alue = IIf(Len(Trim(Na me)) = 0, DBNull.Value,
Name)
parameters(2).V alue = IIf(Len(Trim(Co mpany)) = 0, DBNull.Value,
Company)
parameters(3).D irection = ParameterDirect ion.Output

' I am using this DBObject class for accessing data:
http://www.devx.com/vb2themax/Tip/19480
result = RunProcedure("N ewsletter_Pendi ngSubscriberAdd ",
parameters, rowsAffected)
If result = 0 Then
Return CStr(parameters (3).Value)
Else
Return CInt(result)
End If

End Function
But this is, I think, bad design. Mainly because this method may return
two different kinds of data types: string for uniqueidetifier
(subscriberID) and Integer for RetVal. So I would need to propagate up
the App layers unspecified (until runtime) data type. This can cause
many problems I think. The other approach I can think of would be
returning subscriberID when subscriber was not in db and throwing and
propagating an Exception if they're already in DB:

If result = 0 Then
Return CStr(parameters (3).Value)
Else
Throw Ex("My custom exception")
End If
But I've read somewhere that we shouldn't fool around with exceptions
if the result (from DB in this case) was EXPECTED. And this is expected
behaviour. The exceptions are for unexpected situations, I think. Hey,
but what do I know, I'm a rookie! Is there the third (right) way of
doing this? Where do I make my design mistakes? Any advice appreciated!

Thanks
Best regards
Maciek

Aug 11 '06 #1
4 1357
Hi Maciek,

I think it's better to return 2 outputs in this case
@status which indicate 0,1,2

if @status=0 then get @subscriberID
else it's an error

Regards,
Infinity
Maciek wrote:
I've got this question regarding programming and design practices. I'm
designing Newsletter module for my WebApp and I'm greenhorn in
programming.
There's a stored procedure which adds a subscriber to a DB. It outputs
subscriberID (uniqueidetifie r) if it succeeds to add them to the
database and return value of "0". When the subscriber already exists
but hasn't activated/confirmed their account it returns null for
subscriberID and return value of "1". If the subscriber exists and is
fully activated it returns null for subscriberID and return value of
"2". Here is the SP code:

create procedure Newsletter_Pend ingSubscriberAd d
@email varchar(255),
@name varchar(255) = null,
@company varchar(255)= null,
@subscriberID uniqueidentifie r output
as
set nocount on
if exists (select email from Newsletter_Subs cribers where email =
@email) return 2
if exists (select email from Newsletter_Pend ingSubscribers where email
= @email) return 1

select @subscriberID = newid()

declare @err int
insert into Newsletter_Pend ingSubscribers (subscriberid, email, [name],
company) values (@subscriberID, @email, @name, @company)
select @err = @@error if @err <0 return @err
return 0

set nocount off
GO
Now in my data layer in my App I'm trying to write method to add the
subscriber to the db. My problem is how and where to react on different
values returned from sql. The method is accessing the procedure and now
I check the Return Value. If it's 0 the method returns subscriberID and
if it's not -- it returns the Return Value.

Public Function Add(ByVal Email As String, ByVal Name As String,
ByVal Company As String)
Dim rowsAffected As Integer
Dim result As Integer
Dim parameters As SqlParameter() = { _
New SqlParameter("@ email", SqlDbType.VarCh ar, 255), _
New SqlParameter("@ name", SqlDbType.VarCh ar, 255), _
New SqlParameter("@ company", SqlDbType.VarCh ar, 255), _
New SqlParameter("@ subscriberID", SqlDbType.Uniqu eIdentifier)}

parameters(0).V alue = IIf(Len(Trim(Em ail)) = 0, DBNull.Value,
Email)
parameters(1).V alue = IIf(Len(Trim(Na me)) = 0, DBNull.Value,
Name)
parameters(2).V alue = IIf(Len(Trim(Co mpany)) = 0, DBNull.Value,
Company)
parameters(3).D irection = ParameterDirect ion.Output

' I am using this DBObject class for accessing data:
http://www.devx.com/vb2themax/Tip/19480
result = RunProcedure("N ewsletter_Pendi ngSubscriberAdd ",
parameters, rowsAffected)
If result = 0 Then
Return CStr(parameters (3).Value)
Else
Return CInt(result)
End If

End Function
But this is, I think, bad design. Mainly because this method may return
two different kinds of data types: string for uniqueidetifier
(subscriberID) and Integer for RetVal. So I would need to propagate up
the App layers unspecified (until runtime) data type. This can cause
many problems I think. The other approach I can think of would be
returning subscriberID when subscriber was not in db and throwing and
propagating an Exception if they're already in DB:

If result = 0 Then
Return CStr(parameters (3).Value)
Else
Throw Ex("My custom exception")
End If
But I've read somewhere that we shouldn't fool around with exceptions
if the result (from DB in this case) was EXPECTED. And this is expected
behaviour. The exceptions are for unexpected situations, I think. Hey,
but what do I know, I'm a rookie! Is there the third (right) way of
doing this? Where do I make my design mistakes? Any advice appreciated!

Thanks
Best regards
Maciek
Aug 11 '06 #2
Step back. Look at the architecture of your data layer. Try to understand
HOW you want your business objects to interact with the database.

There is nothing wrong with combining the 'lookup' and 'insert' operators as
you have. I rather like the idea and have suggested it to other folks many
times. [Aside: Keep in mind that you want to make sure that you have
'scrubbed' that e-mail field (forced to lower case, removed leading and
trailing blanks) to keep your comparison clean. SQL can ignore case on
compare, but scrub the data anyway, so that later on, you can do the compare
at any layer if you need to move it.]

In your model, you have a business layer that 'knows' about a subscriber.
We suspect that they are new but are not sure. From it's standpoint, it
wants to save that data and have the right id to refer to it later. I
assume the BL also wants to know the activation status.

So the interaction goes like this:
BL: Hey, db layer. I have a subscriber.
DL: Cool. Here's his ID and his status
BL: thanks.

There is no reason to have the business layer interpret three different
possibilities.

Simply set up your stored proc to do this:
1) If the subscriber already exists, return the subscriber's ID and status.
Use newly provided data to update old record.
2) If the subscriber doesn't exist, add them with a status of 'unactivated'.
Return the subscribers ID and status.

Now, there are no codes. The business layer knows that the data is
persisted, and it knows the ID to use to find it, and it knows the status of
the subscriber.

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"Maciek" <ma****@kolobrz eg.com.plwrote in message
news:11******** **************@ i42g2000cwa.goo glegroups.com.. .
I've got this question regarding programming and design practices. I'm
designing Newsletter module for my WebApp and I'm greenhorn in
programming.
There's a stored procedure which adds a subscriber to a DB. It outputs
subscriberID (uniqueidetifie r) if it succeeds to add them to the
database and return value of "0". When the subscriber already exists
but hasn't activated/confirmed their account it returns null for
subscriberID and return value of "1". If the subscriber exists and is
fully activated it returns null for subscriberID and return value of
"2". Here is the SP code:

create procedure Newsletter_Pend ingSubscriberAd d
@email varchar(255),
@name varchar(255) = null,
@company varchar(255)= null,
@subscriberID uniqueidentifie r output
as
set nocount on
if exists (select email from Newsletter_Subs cribers where email =
@email) return 2
if exists (select email from Newsletter_Pend ingSubscribers where email
= @email) return 1

select @subscriberID = newid()

declare @err int
insert into Newsletter_Pend ingSubscribers (subscriberid, email, [name],
company) values (@subscriberID, @email, @name, @company)
select @err = @@error if @err <0 return @err
return 0

set nocount off
GO
Now in my data layer in my App I'm trying to write method to add the
subscriber to the db. My problem is how and where to react on different
values returned from sql. The method is accessing the procedure and now
I check the Return Value. If it's 0 the method returns subscriberID and
if it's not -- it returns the Return Value.

Public Function Add(ByVal Email As String, ByVal Name As String,
ByVal Company As String)
Dim rowsAffected As Integer
Dim result As Integer
Dim parameters As SqlParameter() = { _
New SqlParameter("@ email", SqlDbType.VarCh ar, 255), _
New SqlParameter("@ name", SqlDbType.VarCh ar, 255), _
New SqlParameter("@ company", SqlDbType.VarCh ar, 255), _
New SqlParameter("@ subscriberID", SqlDbType.Uniqu eIdentifier)}

parameters(0).V alue = IIf(Len(Trim(Em ail)) = 0, DBNull.Value,
Email)
parameters(1).V alue = IIf(Len(Trim(Na me)) = 0, DBNull.Value,
Name)
parameters(2).V alue = IIf(Len(Trim(Co mpany)) = 0, DBNull.Value,
Company)
parameters(3).D irection = ParameterDirect ion.Output

' I am using this DBObject class for accessing data:
http://www.devx.com/vb2themax/Tip/19480
result = RunProcedure("N ewsletter_Pendi ngSubscriberAdd ",
parameters, rowsAffected)
If result = 0 Then
Return CStr(parameters (3).Value)
Else
Return CInt(result)
End If

End Function
But this is, I think, bad design. Mainly because this method may return
two different kinds of data types: string for uniqueidetifier
(subscriberID) and Integer for RetVal. So I would need to propagate up
the App layers unspecified (until runtime) data type. This can cause
many problems I think. The other approach I can think of would be
returning subscriberID when subscriber was not in db and throwing and
propagating an Exception if they're already in DB:

If result = 0 Then
Return CStr(parameters (3).Value)
Else
Throw Ex("My custom exception")
End If
But I've read somewhere that we shouldn't fool around with exceptions
if the result (from DB in this case) was EXPECTED. And this is expected
behaviour. The exceptions are for unexpected situations, I think. Hey,
but what do I know, I'm a rookie! Is there the third (right) way of
doing this? Where do I make my design mistakes? Any advice appreciated!

Thanks
Best regards
Maciek

Aug 11 '06 #3
Thank you Nick for your valuable remarks. Now I think I get it.

One more question. I was wondering if you know of any books/articles
focusing on designing multi tier apps with some advices, good practices
and explanations what the layers should or shouldn't be. How to convert
our concepts into well designed layers...
I know the knowledge comes with the experience but there must be some
rules of thumb, some DOs and DON'Ts which would help the beginner to
sail safely through the multi-tier app desing reefs ;-)
Anyway if you could point out something, I would be very greatfull.

Once again thanks!
Regards

Maciek

Nick Malik [Microsoft] napisal(a):
Step back. Look at the architecture of your data layer. Try to understand
HOW you want your business objects to interact with the database.

There is nothing wrong with combining the 'lookup' and 'insert' operators as
you have. I rather like the idea and have suggested it to other folks many
times. [Aside: Keep in mind that you want to make sure that you have
'scrubbed' that e-mail field (forced to lower case, removed leading and
trailing blanks) to keep your comparison clean. SQL can ignore case on
compare, but scrub the data anyway, so that later on, you can do the compare
at any layer if you need to move it.]

In your model, you have a business layer that 'knows' about a subscriber.
We suspect that they are new but are not sure. From it's standpoint, it
wants to save that data and have the right id to refer to it later. I
assume the BL also wants to know the activation status.

So the interaction goes like this:
BL: Hey, db layer. I have a subscriber.
DL: Cool. Here's his ID and his status
BL: thanks.

There is no reason to have the business layer interpret three different
possibilities.

Simply set up your stored proc to do this:
1) If the subscriber already exists, return the subscriber's ID and status.
Use newly provided data to update old record.
2) If the subscriber doesn't exist, add them with a status of 'unactivated'.
Return the subscribers ID and status.

Now, there are no codes. The business layer knows that the data is
persisted, and it knows the ID to use to find it, and it knows the status of
the subscriber.

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"Maciek" <ma****@kolobrz eg.com.plwrote in message
news:11******** **************@ i42g2000cwa.goo glegroups.com.. .
I've got this question regarding programming and design practices. I'm
designing Newsletter module for my WebApp and I'm greenhorn in
programming.
There's a stored procedure which adds a subscriber to a DB. It outputs
subscriberID (uniqueidetifie r) if it succeeds to add them to the
database and return value of "0". When the subscriber already exists
but hasn't activated/confirmed their account it returns null for
subscriberID and return value of "1". If the subscriber exists and is
fully activated it returns null for subscriberID and return value of
"2". Here is the SP code:

create procedure Newsletter_Pend ingSubscriberAd d
@email varchar(255),
@name varchar(255) = null,
@company varchar(255)= null,
@subscriberID uniqueidentifie r output
as
set nocount on
if exists (select email from Newsletter_Subs cribers where email =
@email) return 2
if exists (select email from Newsletter_Pend ingSubscribers where email
= @email) return 1

select @subscriberID = newid()

declare @err int
insert into Newsletter_Pend ingSubscribers (subscriberid, email, [name],
company) values (@subscriberID, @email, @name, @company)
select @err = @@error if @err <0 return @err
return 0

set nocount off
GO
Now in my data layer in my App I'm trying to write method to add the
subscriber to the db. My problem is how and where to react on different
values returned from sql. The method is accessing the procedure and now
I check the Return Value. If it's 0 the method returns subscriberID and
if it's not -- it returns the Return Value.

Public Function Add(ByVal Email As String, ByVal Name As String,
ByVal Company As String)
Dim rowsAffected As Integer
Dim result As Integer
Dim parameters As SqlParameter() = { _
New SqlParameter("@ email", SqlDbType.VarCh ar, 255), _
New SqlParameter("@ name", SqlDbType.VarCh ar, 255), _
New SqlParameter("@ company", SqlDbType.VarCh ar, 255), _
New SqlParameter("@ subscriberID", SqlDbType.Uniqu eIdentifier)}

parameters(0).V alue = IIf(Len(Trim(Em ail)) = 0, DBNull.Value,
Email)
parameters(1).V alue = IIf(Len(Trim(Na me)) = 0, DBNull.Value,
Name)
parameters(2).V alue = IIf(Len(Trim(Co mpany)) = 0, DBNull.Value,
Company)
parameters(3).D irection = ParameterDirect ion.Output

' I am using this DBObject class for accessing data:
http://www.devx.com/vb2themax/Tip/19480
result = RunProcedure("N ewsletter_Pendi ngSubscriberAdd ",
parameters, rowsAffected)
If result = 0 Then
Return CStr(parameters (3).Value)
Else
Return CInt(result)
End If

End Function
But this is, I think, bad design. Mainly because this method may return
two different kinds of data types: string for uniqueidetifier
(subscriberID) and Integer for RetVal. So I would need to propagate up
the App layers unspecified (until runtime) data type. This can cause
many problems I think. The other approach I can think of would be
returning subscriberID when subscriber was not in db and throwing and
propagating an Exception if they're already in DB:

If result = 0 Then
Return CStr(parameters (3).Value)
Else
Throw Ex("My custom exception")
End If
But I've read somewhere that we shouldn't fool around with exceptions
if the result (from DB in this case) was EXPECTED. And this is expected
behaviour. The exceptions are for unexpected situations, I think. Hey,
but what do I know, I'm a rookie! Is there the third (right) way of
doing this? Where do I make my design mistakes? Any advice appreciated!

Thanks
Best regards
Maciek
Aug 17 '06 #4
Hello Maciek,

I want to be helpful. I really do. Unfortuately, all I can give you are
patterns books because that's what I learned from myself. Start with Design
Patterns by Gamma, Helm, Johnson, and Vlissides and Design Patterns
Explained by Shalloway. Once you have attempted that, you can pretty much
figure this out all by yourself.

Don't forget to check out the Patterns and Practices site on Microsoft.com

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"Maciek" <ma****@kolobrz eg.com.plwrote in message
news:11******** **************@ i42g2000cwa.goo glegroups.com.. .
Thank you Nick for your valuable remarks. Now I think I get it.

One more question. I was wondering if you know of any books/articles
focusing on designing multi tier apps with some advices, good practices
and explanations what the layers should or shouldn't be. How to convert
our concepts into well designed layers...
I know the knowledge comes with the experience but there must be some
rules of thumb, some DOs and DON'Ts which would help the beginner to
sail safely through the multi-tier app desing reefs ;-)
Anyway if you could point out something, I would be very greatfull.

Once again thanks!
Regards

Maciek

Nick Malik [Microsoft] napisal(a):
>Step back. Look at the architecture of your data layer. Try to
understand
HOW you want your business objects to interact with the database.

There is nothing wrong with combining the 'lookup' and 'insert' operators
as
you have. I rather like the idea and have suggested it to other folks
many
times. [Aside: Keep in mind that you want to make sure that you have
'scrubbed' that e-mail field (forced to lower case, removed leading and
trailing blanks) to keep your comparison clean. SQL can ignore case on
compare, but scrub the data anyway, so that later on, you can do the
compare
at any layer if you need to move it.]

In your model, you have a business layer that 'knows' about a subscriber.
We suspect that they are new but are not sure. From it's standpoint, it
wants to save that data and have the right id to refer to it later. I
assume the BL also wants to know the activation status.

So the interaction goes like this:
BL: Hey, db layer. I have a subscriber.
DL: Cool. Here's his ID and his status
BL: thanks.

There is no reason to have the business layer interpret three different
possibilitie s.

Simply set up your stored proc to do this:
1) If the subscriber already exists, return the subscriber's ID and
status.
Use newly provided data to update old record.
2) If the subscriber doesn't exist, add them with a status of
'unactivated '.
Return the subscribers ID and status.

Now, there are no codes. The business layer knows that the data is
persisted, and it knows the ID to use to find it, and it knows the status
of
the subscriber.

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representati ve of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"Maciek" <ma****@kolobrz eg.com.plwrote in message
news:11******* *************** @i42g2000cwa.go oglegroups.com. ..
I've got this question regarding programming and design practices. I'm
designing Newsletter module for my WebApp and I'm greenhorn in
programming.
There's a stored procedure which adds a subscriber to a DB. It outputs
subscriberID (uniqueidetifie r) if it succeeds to add them to the
database and return value of "0". When the subscriber already exists
but hasn't activated/confirmed their account it returns null for
subscriberID and return value of "1". If the subscriber exists and is
fully activated it returns null for subscriberID and return value of
"2". Here is the SP code:

create procedure Newsletter_Pend ingSubscriberAd d
@email varchar(255),
@name varchar(255) = null,
@company varchar(255)= null,
@subscriberID uniqueidentifie r output
as
set nocount on
if exists (select email from Newsletter_Subs cribers where email =
@email) return 2
if exists (select email from Newsletter_Pend ingSubscribers where email
= @email) return 1

select @subscriberID = newid()

declare @err int
insert into Newsletter_Pend ingSubscribers (subscriberid, email, [name],
company) values (@subscriberID, @email, @name, @company)
select @err = @@error if @err <0 return @err
return 0

set nocount off
GO
Now in my data layer in my App I'm trying to write method to add the
subscriber to the db. My problem is how and where to react on different
values returned from sql. The method is accessing the procedure and now
I check the Return Value. If it's 0 the method returns subscriberID and
if it's not -- it returns the Return Value.

Public Function Add(ByVal Email As String, ByVal Name As String,
ByVal Company As String)
Dim rowsAffected As Integer
Dim result As Integer
Dim parameters As SqlParameter() = { _
New SqlParameter("@ email", SqlDbType.VarCh ar, 255), _
New SqlParameter("@ name", SqlDbType.VarCh ar, 255), _
New SqlParameter("@ company", SqlDbType.VarCh ar, 255), _
New SqlParameter("@ subscriberID", SqlDbType.Uniqu eIdentifier)}

parameters(0).V alue = IIf(Len(Trim(Em ail)) = 0, DBNull.Value,
Email)
parameters(1).V alue = IIf(Len(Trim(Na me)) = 0, DBNull.Value,
Name)
parameters(2).V alue = IIf(Len(Trim(Co mpany)) = 0, DBNull.Value,
Company)
parameters(3).D irection = ParameterDirect ion.Output

' I am using this DBObject class for accessing data:
http://www.devx.com/vb2themax/Tip/19480
result = RunProcedure("N ewsletter_Pendi ngSubscriberAdd ",
parameters, rowsAffected)
If result = 0 Then
Return CStr(parameters (3).Value)
Else
Return CInt(result)
End If

End Function
But this is, I think, bad design. Mainly because this method may return
two different kinds of data types: string for uniqueidetifier
(subscriberID) and Integer for RetVal. So I would need to propagate up
the App layers unspecified (until runtime) data type. This can cause
many problems I think. The other approach I can think of would be
returning subscriberID when subscriber was not in db and throwing and
propagating an Exception if they're already in DB:

If result = 0 Then
Return CStr(parameters (3).Value)
Else
Throw Ex("My custom exception")
End If
But I've read somewhere that we shouldn't fool around with exceptions
if the result (from DB in this case) was EXPECTED. And this is expected
behaviour. The exceptions are for unexpected situations, I think. Hey,
but what do I know, I'm a rookie! Is there the third (right) way of
doing this? Where do I make my design mistakes? Any advice appreciated!

Thanks
Best regards
Maciek

Aug 21 '06 #5

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

Similar topics

136
9457
by: Matt Kruse | last post by:
http://www.JavascriptToolbox.com/bestpractices/ I started writing this up as a guide for some people who were looking for general tips on how to do things the 'right way' with Javascript. Their code was littered with document.all and eval, for example, and I wanted to create a practical list of best practices that they could easily put to use. The above URL is version 1.0 (draft) that resulted. IMO, it is not a replacement for the FAQ,...
2
2222
by: Ed_P | last post by:
Hello I just wanted to get the opinions of those of you who have experience developing C# applications and programming in general. I currently am learning the basics of programming (choosing C# as the language of choice) and have developed simple applications to work with Access/SQL databases. I have accomplished all tasks that I wanted to with the small but simple applications...learned alot about the syntax and logic used in C# an...
16
1691
by: codemonk | last post by:
Hi all, Is there anyone else on this board that feels Extreme Programming (although) making some great points is a little overcooked, extreme and just plain nonsense at times? Stede
8
2387
by: Dale | last post by:
I've searched Amazon and read probably 100 reviews but can't find what seems to be any book that is widely accepted as the definitive book on object oriented programming design and techniques. And most of the highest rated are all written 10 to 15 years ago. Any good suggestions?
10
3483
by: jojobar | last post by:
Hello, I am trying to use vs.net 2005 to migrate a project originally in vs.net 2003. I started with creation of a "web site", and then created folders for each component of the site. I read somewhere that each folder under the "web site" is compiled in separate assembly. I however, did not find that the "web site" creation in vs.net 2005 created any AssemblyInfo.cs file.
9
2511
by: John Salerno | last post by:
There is an article on oreilly.net's OnLamp site called "The World's Most Maintainable Programming Language" (http://www.oreillynet.com/onlamp/blog/2006/03/the_worlds_most_maintainable_p.html). It's not about a specific language, but about the qualities that would make up the title language (learnability, consistency, simplicity, power, enforcing good programming practices). I thought this might be of interest to some of you, and I...
2
1316
by: Maciek | last post by:
I've got this question regarding programming practices. I'm designing Newsletter module in my WebApp and I'm greenhorn in programming. There's a stored procedure which adds a subscriber to a DB. It outputs subscriberID (uniqueidetifier) if it succeeds to add them to the database and return value of "0". When the subscriber already exists but hasn't activated/confirmed their account it returns null for subscriberID and return value of "1"....
7
4965
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 developed significant content for the C programming language that is available at: https://www.securecoding.cert.org/ by clicking on the "CERT C Programming Language Secure Coding Standard"
17
4722
by: CoreyWhite | last post by:
I bought this book years ago, when I was just learning C++. Since then I've gone through every math course offered at my college, taken courses on coding C & thinking in terms how how to make the smallest tightest algorithms to preform specific functions. I've also grown and matured a lot, and am wiser and older. I'm reading through the C+ + Programming Language, Third Edition now, and I can actually understand it. I can understand it...
0
9481
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
10155
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
10095
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
9953
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...
1
7502
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
6741
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
5513
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4054
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2881
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.