Quantcast

Maximum PC

It is currently Mon Apr 21, 2014 4:33 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 23 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Can someone give me an idea for a OOP project
PostPosted: Thu Apr 28, 2011 4:07 pm 
Little Foot
Little Foot

Joined: Sat Feb 11, 2006 11:04 am
Posts: 174
So basically in school they have us do some bullshit GUI stuff for our OOP class. I am already pass this and am bored. Can some of you guys give me a oop project to complete preferably a client/server app ( C# and ADO.net).


Top
  Profile  
 
 Post subject: Re: Can someone give me an idea for a OOP project
PostPosted: Thu Apr 28, 2011 6:17 pm 
SON OF A GUN
SON OF A GUN
User avatar

Joined: Mon Nov 01, 2004 5:41 am
Posts: 11605
Client/Server /w a Gui? You could always make a chatroom application.

Bullshit GUI stuff? Define bullshit. GUIs are kind of important.

You could always try this one: http://en.wikipedia.org/wiki/Tower_of_Hanoi

Or anything here: http://www.topcoder.com/


Top
  Profile  
 
 Post subject: Re: Can someone give me an idea for a OOP project
PostPosted: Thu Apr 28, 2011 7:15 pm 
Little Foot
Little Foot

Joined: Sat Feb 11, 2006 11:04 am
Posts: 174
no games. Preferably business apps. Something a boss would give an employee to do.


Top
  Profile  
 
 Post subject: Re: Can someone give me an idea for a OOP project
PostPosted: Fri Apr 29, 2011 4:22 am 
SON OF A GUN
SON OF A GUN
User avatar

Joined: Mon Nov 01, 2004 5:41 am
Posts: 11605
Use the Northwind sample database and build an application to allow a user to search order information. Start there, see how that goes... Take your time and do it right. Build the proper application layers (data access, bussiness, presentation, gui) have a common library for common (duh) functions that can be used in any layer. If you do this, then adding newer features such as adding new orders, editing customer info, etc should be cake.


Top
  Profile  
 
 Post subject: Re: Can someone give me an idea for a OOP project
PostPosted: Sat Apr 30, 2011 6:16 pm 
Little Foot
Little Foot

Joined: Sat Feb 11, 2006 11:04 am
Posts: 174
Here you go sir. Consider this my first draft:
https://rapidshare.com/files/460016130/setup.rar <------------- setup

https://rapidshare.com/files/460016287/NorthWind.rar <------------- source code


Top
  Profile  
 
 Post subject: Re: Can someone give me an idea for a OOP project
PostPosted: Sun May 01, 2011 5:24 am 
SON OF A GUN
SON OF A GUN
User avatar

Joined: Mon Nov 01, 2004 5:41 am
Posts: 11605
IMO, megaupload or 4shared is better, but I'll give it a look. :)


Top
  Profile  
 
 Post subject: Re: Can someone give me an idea for a OOP project
PostPosted: Sun May 01, 2011 5:47 am 
SON OF A GUN
SON OF A GUN
User avatar

Joined: Mon Nov 01, 2004 5:41 am
Posts: 11605
Initial critique...

I am not sure what the real goal was here... but this really probably should have been a GUI application. I suppose CLI is fine... but not what I would have expected.

You have data access mixed with business objects, which is poor design. As is having a connection string in the business object class.

I would rethink you exception handling strategy, as what you are doing is poor coding.
Code:
            catch (NotSupportedException)
            {
                throw new NotSupportedException();
            }
            catch (ApplicationException)
            {
                throw new ApplicationException();
            }
            catch (Exception)
            {
                throw new Exception();
            }


Top
  Profile  
 
 Post subject: Re: Can someone give me an idea for a OOP project
PostPosted: Sun May 01, 2011 7:16 am 
Little Foot
Little Foot

Joined: Sat Feb 11, 2006 11:04 am
Posts: 174
CrashTECH wrote:
Initial critique...

I am not sure what the real goal was here... but this really probably should have been a GUI application. I suppose CLI is fine... but not what I would have expected.

You have data access mixed with business objects, which is poor design. As is having a connection string in the business object class.

I would rethink you exception handling strategy, as what you are doing is poor coding.
Code:
            catch (NotSupportedException)
            {
                throw new NotSupportedException();
            }
            catch (ApplicationException)
            {
                throw new ApplicationException();
            }
            catch (Exception)
            {
                throw new Exception();
            }



Can you explain how my exception handling is poor? Also, sorry about the "GUI". That is how our teacher is teaching us lol. Also, I build this as a 3 Tier client/server application because since functionality is limited there is no need to go N-Tier. But thats just my opinion and i would like to know why you think N-Tier is the bettter route to go.


Top
  Profile  
 
 Post subject: Re: Can someone give me an idea for a OOP project
PostPosted: Sun May 01, 2011 1:11 pm 
SON OF A GUN
SON OF A GUN
User avatar

Joined: Mon Nov 01, 2004 5:41 am
Posts: 11605
xxmainframexpxx wrote:
Can you explain how my exception handling is poor?
Check out the link I posted for the exception handling. Everything is explained there. There isn't a need to handle any of those exceptions unless you can actually do something bout it. Also you are going to end up losing parts of the original exception, namely the stack trace by re-throwing the exception.

xxmainframexpxx wrote:
Also, sorry about the "GUI". That is how our teacher is teaching us lol.
If your professor is calling this a GUI, then you need to find a new school / professor / program. It isn't "graphical" at all. There is nothing technically wrong with doing it as a CLI project though. Just not what I would have expected.

xxmainframexpxx wrote:
Also, I build this as a 3 Tier client/server application because since functionality is limited there is no need to go N-Tier. But thats just my opinion and i would like to know why you think N-Tier is the bettter route to go.
Simple answer is, I asked for an N-Tier :) If I was your proff, you'd have lost points for not following directions! I was going to build on top of this example (hinted at by the quoted post below). I was just trying to get you to THINK about the problem in the correct way. Sure it is "overkill" for looking up order info, but that isn't the end-game goal. It is also pretty common place in the industry to do things this way and it is generally the accepted practice.

CrashTECH wrote:
Use the Northwind sample database and build an application to allow a user to search order information. Start there, see how that goes... Take your time and do it right. Build the proper application layers (data access, bussiness, presentation, gui) have a common library for common (duh) functions that can be used in any layer. If you do this, then adding newer features such as adding new orders, editing customer info, etc should be cake.


Top
  Profile  
 
 Post subject: Re: Can someone give me an idea for a OOP project
PostPosted: Sun May 01, 2011 8:06 pm 
Little Foot
Little Foot

Joined: Sat Feb 11, 2006 11:04 am
Posts: 174
do you know of any good books or tutorial on how to build GUI?


Top
  Profile  
 
 Post subject: Re: Can someone give me an idea for a OOP project
PostPosted: Mon May 02, 2011 3:29 am 
SON OF A GUN
SON OF A GUN
User avatar

Joined: Mon Nov 01, 2004 5:41 am
Posts: 11605
http://www.java2s.com/Tutorial/CSharp/0 ... -Forms.htm
http://stackoverflow.com/questions/1184 ... r-tutorial
http://cplus.about.com/od/learnc/ss/random.htm
http://stackoverflow.com/questions/9559 ... rial-for-c
http://codesamplez.com/development/gett ... in-c-sharp
http://www.wpftutorial.net/
http://msdn.microsoft.com/en-us/library/ms752299.aspx
http://www.switchonthecode.com/tutorial ... n-winforms

Not sure how valuable this one will be:
http://forums.ngemu.com/web-development ... orial.html


That should keep you busy for a while :)


Top
  Profile  
 
 Post subject: Re: Can someone give me an idea for a OOP project
PostPosted: Thu May 05, 2011 4:41 pm 
Little Foot
Little Foot

Joined: Sat Feb 11, 2006 11:04 am
Posts: 174
show me the data access layer because i still think you would need data access code within the business object layer.


Top
  Profile  
 
 Post subject: Re: Can someone give me an idea for a OOP project
PostPosted: Thu May 05, 2011 6:41 pm 
SON OF A GUN
SON OF A GUN
User avatar

Joined: Mon Nov 01, 2004 5:41 am
Posts: 11605
xxmainframexpxx wrote:
show me the data access layer because i still think you would need data access code within the business object layer.
Oh no, not at all. One very common way is the factory pattern. I should have a little time this weekend to update your project a little bit.


Top
  Profile  
 
 Post subject: Re: Can someone give me an idea for a OOP project
PostPosted: Sun May 08, 2011 7:56 pm 
Little Foot
Little Foot

Joined: Sat Feb 11, 2006 11:04 am
Posts: 174
CrashTECH wrote:
xxmainframexpxx wrote:
show me the data access layer because i still think you would need data access code within the business object layer.
Oh no, not at all. One very common way is the factory pattern. I should have a little time this weekend to update your project a little bit.

can you show me how its done


Top
  Profile  
 
 Post subject: Re: Can someone give me an idea for a OOP project
PostPosted: Mon May 09, 2011 7:13 am 
SON OF A GUN
SON OF A GUN
User avatar

Joined: Mon Nov 01, 2004 5:41 am
Posts: 11605
I'd be more than happy to. Was REALLY busy this weekend. I'll try to get to it tonight.


Top
  Profile  
 
 Post subject: Re: Can someone give me an idea for a OOP project
PostPosted: Mon May 09, 2011 6:28 pm 
SON OF A GUN
SON OF A GUN
User avatar

Joined: Mon Nov 01, 2004 5:41 am
Posts: 11605
I haven't forgotten about this. Spent some time with the wife and I am prep-ing a new system :)


Top
  Profile  
 
 Post subject: Re: Can someone give me an idea for a OOP project
PostPosted: Tue May 10, 2011 6:21 pm 
SON OF A GUN
SON OF A GUN
User avatar

Joined: Mon Nov 01, 2004 5:41 am
Posts: 11605
You'll need to download VS 2010 Express (or go through dreamspark, sorry. Don't have VS 2008 installed).

I suppose you could manually re-create the solution and replace the files? Or hand edit the project/solution files?

I added a few comments, didn't get to spend much time on it. It compiles. I didn't have a way to test any of it though.

Here is the zip: http://www.4shared.com/file/UU9cUO5c/NorthWind.html


Top
  Profile  
 
 Post subject: Re: Can someone give me an idea for a OOP project
PostPosted: Tue May 10, 2011 7:20 pm 
Little Foot
Little Foot

Joined: Sat Feb 11, 2006 11:04 am
Posts: 174
heh, looks weird. Im going to give it another shot.


Top
  Profile  
 
 Post subject: Re: Can someone give me an idea for a OOP project
PostPosted: Wed May 11, 2011 4:06 am 
SON OF A GUN
SON OF A GUN
User avatar

Joined: Mon Nov 01, 2004 5:41 am
Posts: 11605
What is weird about it?

Add a few more "screens". Customers, Order headers, etc. :)

You'll see how things are grouped together. In the end, that it means is that the Business object doesn't care about where the data comes from since the factory is responsible for putting that together. The factory doesn't care what data store it is connected to, because all it wants is a DataRow. See? So now you can change the database form say, MS SQL, to Oracle, to SQL Lite and nobody could care, all the way up to the user interface.


Top
  Profile  
 
 Post subject: Re: Can someone give me an idea for a OOP project
PostPosted: Sat May 14, 2011 8:01 pm 
Little Foot
Little Foot

Joined: Sat Feb 11, 2006 11:04 am
Posts: 174
reason for datatable?


Top
  Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 23 posts ]  Go to page 1, 2  Next

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group