Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003
This is the forum to discuss the Wrox book Professional VB.NET 2003 by Bill Evjen, Billy Hollis, Rockford Lhotka, Tim McCarthy, Jonathan Pinnock, Rama Ramachandran, Bill Sheldon; ISBN: 9780764559921
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old August 27th, 2003, 12:18 AM
Registered User
Join Date: Aug 2003
Location: , , India.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default DESIGN Patterns

hi ,

i m trying to get information on Design Patterns for VB.net . Can someone plz help.

  #2 (permalink)  
Old August 30th, 2003, 02:53 PM
Authorized User
Join Date: Aug 2003
Location: Brisbane, Queensland, Australia.
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts

Yo! What do you mean by Design Pattern, please? Is it a general stategy for planning a project?

  #3 (permalink)  
Old August 31st, 2003, 01:46 PM
Authorized User
Join Date: Jun 2003
Location: Cowes, IOW, United Kingdom.
Posts: 44
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to JonathanC

I will try to give a very generalized view of what a Pattern is. This is because it can be interpreted by different people from different backgrounds in different ways. So here is an overly simplified version, with as little terminology as I can :)

Since programming activities have existed for a long, long time and certain problems have arisen over and over again, patterns address some of these problems by offering a solution. The solution can sometimes be standardized and documented. Design Patterns are a result of people learning ways of doing things and constructing guidelines for doing it. They are not fool-proof, nor are they appropriate for every occasion, but they do offer benefit where they fit the problem.
It is not fixed thing - more patterns are being created all the time.
You can create patterns too!

Let's create our own somewhat silly design pattern here quickly (so that you get the idea) -
Lets call it ExternalAccess.
Reason for pattern: To make sure that whenever a propery is used it uses the rules for the property.
Example (our set always adds a 1)
Property myValue as Integer
        Return internalFieldValue
    end get
        internalFieldValue = Value +1
    end set
end property

if our code inside the class talks directly to internalFieldValue it will not run the code thus not adding the 1.
This is a problem.

the rules for negating this problem:
- The object must have Property Accessors (Gets/Sets)
- All fields must be private to the class.
- when internal code (code within a member of the same class) uses the property it must use the property and not the field.

So in this simple example, all we have really done is provided some guidelines, but in a more complex pattern we may also have declared what kinds of objects to create and how to use them.

So, Design Patterns are kind of like a cross between templates and coding guidelines for constructing code.

Recognized Patterns are those that have been accepted by the general community of architects and developers to be useful. These include patterns like Abstract Factory and Facade.

Most of the time, Patterns are relatively language independant, so you can use the same pattern in different languages. Some patterns though have specific ideas about the language. When it comes to .NET, C# and VB.NET patterns will be absolutely the same except for syntax. This is because it has the same ideas about types, classes and the language syntax is for the most part nearly a 1 on 1 mapping. So if you find a pattern implemented in c# (provided you can read c#) would also be helpful to you.

Here are a few c# and vb.net links (the c# may be easy enough to get you started even though you are coding in VB.NET).


I do not know of any specific VB.NET centric views on Patterns - perhaps some other reader could contribute some links?

Jonathan Crossland
  #4 (permalink)  
Old August 31st, 2003, 02:02 PM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts

Hi there,

Microsoft has released a rather hefty but pretty interesting white paper about patterns in .NET applications called Enterprise Solution Patterns Using Microsoft .NET. Code examples are in C#, but since there isn't much code in the book, that shouldn't be a problem. The book focuses on the patterns more than on the implementation, but they *do* provide basic example to illustrate their point.

The book deals with patterns for multiple kinds of applications; ASP.NET, distributed applications, etc.

You can download the white paper from the Patterns section of the MSDN site at http://msdn.microsoft.com/practices/...se/default.asp



Imar Spaanjaars
Everyone is unique, except for me.

Similar Threads
Thread Thread Starter Forum Replies Last Post
Design Patterns planoie General .NET 5 February 21st, 2007 01:56 PM
Design patterns for web design ceadge HTML Code Clinic 0 June 19th, 2006 11:26 AM
Professional Design patterns in c# preticul Wrox Book Feedback 0 February 7th, 2005 06:36 PM
Java Design issue with UML and Design Patterns the_logical_way Apache Tomcat 0 May 31st, 2004 04:02 AM
Design Patterns Indian Ocean J2EE 0 September 25th, 2003 03:18 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.