G
Guest
Hello All,
I'm always looking for ways to improve my code. Most of the time (whenever
I'm working on a project) I write a bunch of functions. Then after the
project is finished, I put all the similar functions into their own
module/class/page for neatness:
-- like a stringsManipulate class which has all string manipulation methods
to the project...separated from the whole project into its own library for
neatness.
-- like a databaseActions class (or code library) which holds all the
database methods to the project...also separated from the project into its
own library for neatness.
By the time my project is separated/sorted, it consists anywhere from 5-10
pages/libraries of functions so that everything is nice and neat.
However, there are never any delegates, factories, interfaces, extensions,
exceptions classes, none of that. Sometimes I have some error handlers but i
never have any of the other features I just mentioned. So, what i'm
wondering is...is all that fancy stuff really necessary? Or, is that just
something you need to worry about when you're working on something you know
millions of people will use (like some big business product or application
like AOL)?
I've been coding for several years now and I've seen many other people's
coding styles. One guy I knew I think created all his objects from scratch.
I've seen him code his own framework of factories, iterators, interfaces,
structs, event handlers, delegates, creating exceptions here, throwing
exceptions there, extending something there, implementing something here. It
looked very confusing and very time-consuming...yet efficient and neater than
the way I was doing things.
So what I want to know is...is this all fancy stuff necessary or any good
for small-medium website developments or desktop apps? And if so, are there
any links where I can learn the best design, strucutres, object models, and
the like?
I have been looking up some c# design patterns and there are many of them
have my mind going in circles. When coding normally, I never know when I
need to make exceptions, or interfaces, or events...My mind doesn't think
like that and I'm trying to find a place that will make me understand.
Usually I just write a function that does what I need to do and it works so
I take it, break it, and separate it for neatness. But somehow I feel that's
not enough. Somehow I feel I need to get my hands even dirtier and create my
own framework of factories and all those other concepts I can't really
understand. But is it really worth it? And would small web development &
desktop application stuff really have a great improvement in speed and
cleanliness? Well cleanliness I can see...speed I'm not sure of...I guess so?
Hope some of you can help me out. Thanks for reading.
I'm always looking for ways to improve my code. Most of the time (whenever
I'm working on a project) I write a bunch of functions. Then after the
project is finished, I put all the similar functions into their own
module/class/page for neatness:
-- like a stringsManipulate class which has all string manipulation methods
to the project...separated from the whole project into its own library for
neatness.
-- like a databaseActions class (or code library) which holds all the
database methods to the project...also separated from the project into its
own library for neatness.
By the time my project is separated/sorted, it consists anywhere from 5-10
pages/libraries of functions so that everything is nice and neat.
However, there are never any delegates, factories, interfaces, extensions,
exceptions classes, none of that. Sometimes I have some error handlers but i
never have any of the other features I just mentioned. So, what i'm
wondering is...is all that fancy stuff really necessary? Or, is that just
something you need to worry about when you're working on something you know
millions of people will use (like some big business product or application
like AOL)?
I've been coding for several years now and I've seen many other people's
coding styles. One guy I knew I think created all his objects from scratch.
I've seen him code his own framework of factories, iterators, interfaces,
structs, event handlers, delegates, creating exceptions here, throwing
exceptions there, extending something there, implementing something here. It
looked very confusing and very time-consuming...yet efficient and neater than
the way I was doing things.
So what I want to know is...is this all fancy stuff necessary or any good
for small-medium website developments or desktop apps? And if so, are there
any links where I can learn the best design, strucutres, object models, and
the like?
I have been looking up some c# design patterns and there are many of them
have my mind going in circles. When coding normally, I never know when I
need to make exceptions, or interfaces, or events...My mind doesn't think
like that and I'm trying to find a place that will make me understand.
Usually I just write a function that does what I need to do and it works so
I take it, break it, and separate it for neatness. But somehow I feel that's
not enough. Somehow I feel I need to get my hands even dirtier and create my
own framework of factories and all those other concepts I can't really
understand. But is it really worth it? And would small web development &
desktop application stuff really have a great improvement in speed and
cleanliness? Well cleanliness I can see...speed I'm not sure of...I guess so?
Hope some of you can help me out. Thanks for reading.