Reputation: 4816
I work as a ERP programmer, mostly with MS SQL and some kind of scripting programming language.
I also wrote some simple projects in C# (a web application for our company and a simple windows service) and I like it very much, so my next job will hopefully be in .NET environment.
Now I'm learning C# from a Wrox book and I went through all the basics chapters. This is all fine and nice, but in my opinion a better way to learn a language is through a real project. So my question is: what kind of application should I write, so that I can use all the fancy-named concepts, like inheritance, delegates, generics, reflection, LINQ,... It would be nice if it also connects to SQL Server.
I thought about personal expense management system or scheduling system. Any other ideas?
Upvotes: 4
Views: 408
Reputation: 53603
Rule number one in such projects: It must be fun thing, or something you expect to profit from it.
When I was in the same place as you (and I mean the same...C#...WROX book...) I went for an engine of text based Adventure Games.
It has everything you described above, and more important I had fun writing it and later see people play it.
So, it really isn't important what you choose, as long as you enjoy it (and it's scope is big enough).
Upvotes: 3
Reputation: 4816
Thanks for all the answers, with your inspiration I found theme for my project :-)
It is an IS for a Brothel. We keep a list of our Clients, Hookers, Rooms, Available Services, Job histories, Prices,...
Now I created all tables in SQL (with primary, foreign keys and indexes), what is next step? Should I for every table in SQL create it's own class in C# and then add methods to it? And then continue building my Program from this base? Or should I use another approach...?
Thanks
Upvotes: 1
Reputation: 266
You could write an engine that supports adventure-style games - nothing too fancy, but I find that it makes a good beginner project as you can end up working with lots of OO. You could also make a basic media player, although I can't see that being quite so good for getting the fundamentals of the language down. You could even get the XNA Framework and try to write a simple game!
Upvotes: 0
Reputation: 1783
You could always look at an open-source project that uses C#... Usually, they have a lot of the different concepts that you'd like to look into...
-JFV
Upvotes: 0
Reputation: 36987
If you want to try all those "fancy concepts", better make a project that does not reflect at all anything you might do at work. E.g. write a game. If you create a small CRUD application but somehow manage to use inheritance, generics, delegates etc., chances are your program is much more complex than it should. Next time you do something similar at work, you might be tempted to do it the same way. Which would be a real bad idea. (KISS principle)
Upvotes: 1
Reputation: 2275
Any well-designed application could use any or all of those concepts. Language-specific books have a tendency to focus exclusively on language details (for good reason) and generally neglect basic design principles. Another important point is that delegates, generics, reflection, etc. all have their place, but they shouldn't be implemented in an application just "because". That can cause unnecessary complexity.
All of that said, pick a project that interests you. Even better, something that you would actually like to use. Then, before even coding, think about how you should structure the application so that it is easy to modify later and add features. If you're putting all the code in the form/code-behind page, you're probably doing something wrong.
Spend some time learning design patterns. These are "best practices" of organizing code that have developed over time. No need to reinvent the wheel.
Hope this helps.
Upvotes: 2
Reputation: 3610
Go for some basic CRUD app - Video Management System, Student Registration System, Pet Store Inventory System, etc...
Upvotes: 0
Reputation: 48369
I'd go for some sort of simple CRUD application, which will exercise your database skills (and give you an opportunity to use a LINQ provider against your database), but perhaps not too simple; i.e. more than one table.
There's nothing about a given problem that will make it inherently better to learn from. It's probably a good idea to stick to a domain which you can easily design and model against, to remove that aspect from the challenge. You might look at doing something "more" than just data access operations; perhaps something involving graphing or other processing of the data which will give you an opportunity to learn some other API.
Your suggestions (expenses management, scheduler) seem reasonably good to me.
Upvotes: 1