Easy Bake Programming!
Oh man...I need to shut myself up today.
Easy Bake Programming!
Oh man...I need to shut myself up today.
ATS16805 wrote:Hey, NetNerd85, thanks for the info! i like the info in your signature, by the way.
it's interesting that so many here have referenced Java as a good source of understanding OOP. why is that?
Cheers, good to know people find the links as useful as I.
The book that I have that explains OOP does exactly that, it explains OOP free of languages. It teaches you the theory in the chapter I read, then later how to use it all. I wouldn't bother with Java for the web today as it sucks. Stick to PHP... never thought I'd say this but Flash :glare:, I wrote it... shivers and XML is turning out to be REALLY exciting, I love it already... XML is pure power :evilgrin:
Could you explain why Java for the web sucks? Alot of people I work with would disagree
I was more so talking about applets because flash spanked those puppies into history. Java is slow. Java needs to be supported on the users machine to run it. There are just better technologies to use.
But then you can't make a comparison between PHP and a Java applet since they are disimilar technologies...
and Java is good at what?
If you say cross-platform, I'll slap you.
Java being a general purpose language is basically good at most things. It used to be slow but that isn't really the case any more.
Java has some good 'ideas' behind it but it seems to be going no where. What is the future of Java today?
cyberlew15 wrote:As an aspiring web developer at your beginners phase
Well, I should mention a few things, since this thread has pretty much strayed from OOP at times anyway.
I have been publishing HTML since probably 1998 or so. When i first started, I was hand-coding simple pages, and found quite the thrill in the whole "wow! those are my pictures up there in cyber-space for anyone to see! how cool!". I was in a rock band at the time, so i became the web master (which I later handed off the duties to a friend who made a very nice little site, which is basically its current state, complete w/ just the right amount of HTML and Flash coexistence, which i then "maintained" by adding new, updated content, including text and photo galleries, and basically ruined his clean, consistent presentation.). those early pages of mine, before my friend overhauled it, were almost strictly informational, w/ performance dates, a few pictures, and likely way too many silly animated mailbox icons and other silly animated gif's, and the like which used to be so annoyingly popular back in the day! Then i discovered FrontPage and even built a few "webs" for friends based on those FrontPage "themes", which are just utterly "wrong" in retrospect. I recall not having much control over them, as there was a lot of seemingly superfluous FrontPage code. Then I discovered Dreamweaver (probably v3.0 or something), and i thought it was the best thing since sliced bread, cause it let you do what you wanted w/ the code and the design (as opposed to FrontPage which seemed to allow minimal artistic expression for the sake of the "themes", at least for me). Then, i continued down that macromedia road, occasionally stealing some (javascript?) code for special effects here and there-- making fairly decent looking pages, which had under the hood a LOT of extra code, redundant tags, and way too much inline styling. i also was introduced to Perl probably over 5 years ago as well, but, considering my reliance upon DW, only from the plug-and-play use, and not from the writing code use, of course.
About a year ago, a flat-mate friend of mine introduced me to CSS, and the importance of the w3, XHTML, and why it's important to write valid code, adhere to web standards, etc. In the meantime I dabbled w/ Flash, having inherited Studio MX from that same friend, but i was still in the bad habit of letting DreamWeaver write my code for me. It was also around that time that I installed Colfusion MX 6.x (whatever was the version before 7), and started trying to use dynamic content, but the problem was i was too caught up in the whole DreamWeaver / Coldfusion / MS Access integration, that I lost sight of the fact that it all can (and should) be done by hand-coding. How i wasted the hours fooling w/ DW's "application/ database/ recordset" windows, trying to get it to "work right". i was aware of PHP and MySQL, but intimidated by it as it seemed to me that only computer science majors, and genuine geeks might be able to get the hang of it, and all the hand-coding that would be necessary just seemed as it would be such a handicap after having been spoiled by DW's "design view" for so long. then, i finally saw the light. i ditched DreamWeaver only too recently for EditPlus, and PHP, and CSS. I should have done this a LONG time ago. better late than never, i suppose.
so, i do have some experience w/ javascript (from a cut and paste perspective, and i think javascript, and not java, but i'm not sure), and a little bit of flash knowledge, albeit, probably the bandwidth hogging kind! so, that is how i ended up here. it's as if i've come full circle, with a lot of wayward wandering in the meantime. i'm proud to say that i've left dreamweaver behind, and i haven't touched it since i started studying CSS and PHP at the early part of this summer (except for some instances where i needed the FTP for some of the "sites" i stored there, and have since lost the login password info, so i kind of "had to" use DW for management of those files.
as for struggling w/ PHP, i don't think i've found it to be a struggle. i understand it all pretty well, but i am far from mastery. i will need to do a LOT of sample projects and experimentation before i'm ready to write even simple web apps. the CSS is coming along nicely as well, but again, i have a LOT to learn there too.
so, that is reason for my curiosity. i have been involved w/ a lot of stuff for many years, but during that time, i was very misled by dreamweaver, so i find myself having to re-learn a lot of stuff. thankfully, most of it has come to me fairly easily. since i've started, i have been very devoted to learning. it's all i do in my spare time. work the 9 to 5, come home and study, and study all weekend. you might say i'm obsessed w/ it, but oh well. it's what i want to do. i did the same thing at age 15 when i was first studying guitar, which later became my career. i am intent on learning as much as i can. i would love to work for a web development company, but would prefer to work for myself.
on that note, i'd like to say that i have been discouraged by a friend (a very knowledgeable friend, who is an ace w/ PHP, CFM, JSP, etc) who claims that there's no money in web design anymore. i find that hard to believe. and that is not to say that the only reason i'm learning is because i plan to get rich by it. that is not the case. it is simply my desire to learn. if i am able to make a living by it, or to supplement my 9 to 5 w/ it, then great. but at this point, i just desire to learn as much as i can.
Thats gr8 you don't mind if I take your last post and sell it as a biography of you do you with the title live life fast die young start a rock band and the Learn to Program. hehe only joking m8 the best places to learn about these languages are by actually programming in them. start from a reference to all of the code eg for php www.php.net or for javascript your chosen web browsers javascript APi reference. then you go to a hello world tutorial available for any language and flavour of any language around the internet deconstruct the hello world tut to learn what the components of that particular programming language do and then play around with other tut's / set your self projects targets and goals.
Sadly your friend is partly right for most people there is no money to be made from the internet which is why most of us still have 9 to 5 jobs. However a good route into web design is to start your own webpage give some menial stuff away like GUI Stuff crappy stuff that makes a webpage like homer simpsons. Then submit your website to all of the majour search engines and go on to volunteer work for charities. make your website as low maintainence as possible add shoutboxes, guestbooks, mailforms with autoresponders etc custom error pages the more work the better because it means you don't need to change it all that often. once you have a portfolio of charities websites (try well known ones how else do you think they do everything so cheap duh!) about 20-25 small projects even as small as a banner add. then you can go to businesses I did such and such work for so and so and their website gets X amount of hits per month dodgy as hell I know but it works Trust Me. let me know how you get on
thanks for the advice. i really appreciate it. sorry about the bio. i wrote that just after rolling out of bed, so it was kind of like an extension of dreamland. ha! oh well, i felt it necessary to give a bit of the b/g in hopes that you all might better understand where i am here (in the sense that i at least know some stuff, or have been exposed to it in some way or another. i'm not afraid of intimidating projects, as all i have is time. but, i think it's important that i go a certain course-- i should avoid putting the cart before the horse (although i've done it in a lot of ways already). i mean, i probably shouldn't concern myself w/, oh... XML, until i get XHTML covered, for example? seriously, i know i will reference this thread OFTEN because there is very valuable info here; a lot of guidance advice, which i believe is probably really good advice as well. you all seem very sincere and good hearted (from what one can tell in such a forum). thanks a lot to you all for your input. i have learned from this thread, that's for sure. maybe not learned code, but learned some equally important stuff for the greater scope of it all.
cheers, mates!
great but as for xml theres nothing to learn once you open a tag you always have to close it there are no exceptions. That Saved You A Lot of time did'nt it
indeed!
thanks
for your PM
ATS1867
please read my answer
sorry this is out of topic :bemused:
Just to add my piece, I learned a great deal about OOP from Flash, and to be specific, Colin Moock's new(ish) book - Essential Actionscript 2.0. It really covers basic OOP concepts in a big way, and there's a good deal of discussion about what OOP is like in other languages, especially Java. Beyond that, there are some solid examples of using OOP design patterns - specifically in Flash, but the concepts are applicable anywhere. Finally, it's an awesome Flash book. There are things that can be done in Flash now, as of AS 2.0, that completely blew my mind. This is the second of Moock's books that I've read, and he seems to do a really good job of making some pretty advanced material very approachable. Highly recommended.
printelectric,
thanks for that post. do you have any examples of what AS 2.0 makes possible? as someone who has barely done more than make a few motion tweens, i never really thought of it as much of a programming language-- which i realize that i must be sadly mistaken. anything come to mind? i've heard people say (maybe in this thread, or somewhere else) that when java came out, they were in awe, but then flash came out, it seemed to rain on the java parade. in all instances, it's difficult for me to develop a good, clear idea of the importance of java and flash in terms of programming. of course i understand the cosmetic value.
ugh! so much to learn! not to mention, so much to consider trying to develop a mastery! i need to clone myself, so i can do all of this at once-- or, like in the Matrix-- just load me up w/ the program, so i'll know it all in a few seconds! hehe
i just have to accept the fact that it's going to take a lot of time, patience, and dedication to studies. there's simply no other way.
I actually do have one example that I've done. It's the reason I bought the AS 2.0 book, and had to learn it in a hurry. It was designed to be exclusively on CD, so it's a little big (4 mb) - but not considering what it delivers.
The portion of the assignment which forced me to use Flash was the inclusion of 500 technical paper abstracts, which had to be included on CD, and which had to be searchable by several different categories. All of this had to be achieved without any internet connectivity at all. So it had to be some sort of compiled application.
The big things (for me anyway) that I developed on the way were an object oriented menu system, consisting of about 3 classes, and a system to read and sort XML data. The menu system builds itself from an XML file - here's a chunk of it...
<?xml version="1.0" standalone="yes"?>
<menu>
<level1 menuLabel='Schedule at a Glance' menuData='schedule.swf'>
</level1>
<level1 menuLabel='General Information' menuData=''>
<level2 menuLabel='Registration' menuData='registration.swf'>
</level2>
<level2 menuLabel='Housing' menuData='housing.swf'>
</level2>
<level2 menuLabel='Transportation' menuData='transportation.swf'>
</level2>
<level2 menuLabel='Visa Information' menuData='visa.swf'>
</level2>
</level1>
<level1 menuLabel='Short Courses' menuData=''>
<level2 menuLabel='One-Day Courses' menuData='1day_courses.swf'>
</level2>
<level2 menuLabel='Two-Day Courses' menuData='2day_courses.swf'>
</level2>
</level1>
The menu class reads the XML file, creates a menu button instance (another class) for each top-level menu item, determines whether or not that item has submenus (level2), and then replicates the process for each of those level2 items. So you end up with a hierarchical menu that you can edit by simply editing and XML file. The menuData entry in my XML files references the content which each menu button will load when pressed.
The other big chunk of content that I had to develop was the search function. It reads a 500+ page XML file (in this case) into an object called searchData. Different chunks of the data can then be pulled out of the object for display, depending on the user selections.
You can look at this project online at http://www.printelectric.com/ - it is the 1st example in my interactive portfolio. Keep in mind this was my 1st project ever using OOP, so it is a looooooong way from something I'd hold up as best practices or clean code. I was also on a deadline, and I was learning both OOP and Actionscript 2.0 on the way. It also runs a heck of a lot faster on CD, but you'll get the idea.
To my knowledge, Flash was the only way to get this thing done on the timeframe that was required. I put it together in about 8 weeks, from concept to delivery. The intro is NOT done with code - it was done by a subcontractor, and uses old-school Flash techniques - tweening and keyframe animation.
You should check out Colin Moock's site (moock.org). It's very experimental, and frankly far less usable and fun than his old site : ( but he's doing some wacky stuff with Flash. He's been developing multi-user environments with Flash for a few years now, and he's developed a multi-user development 'platform' called Unity, which I believe is entirely Flash object based.
Finally, if you just google OOP actionscript, there's enough info in the first few links to get you started. Samuel Wan also has a good AS OOP book, and I think there are a couple of sample chapters available for reading on Amazon. It's old info, as it relates to AS 1.0 instead of AS 2.0, but the basic OOP info is the same. Actionscript 2.0 just provides a lot more support for OOP features, and a compiler that tells you a lot more about what you've screwed up and where, if you use it right.
Also, feel free to email me if you'd like - scott@...
This is silly, but if you go to the front page of moock.org, and you're the only user, you can't get anywhere. The multi-user environment requires that other users complete your transfer to the next page! You can do it yourself if you open another browser window. But just in case, here's a direct link to the good stuff.
all i can say is "Impressive!". i don't know where else to begin! the stuff demonstrated at printelectric.com is far beyond anything i could dream of creating.
but, i'm still curious, since you've provided the specific example, can you tell me in layman's terms (as much as possible) what part AS and OOP playing in the realization of that project?
also, and this must sound so ignorant, but when using Action Script as a programming language, are you working in the Flash MX application, or is this something that you're hand-coding into the html? that's the part where i'm clueless. for example, i have a copy of Flash MX. supposing i knew enough to complete a similar project, how much of it would i complete inside of the Macromedia app, and how much of it could be done w/ a text editor?
i see also the php file extension, so you're using XML to tell flash what to do w/ the PHP? wow. it's really over my puny head! give me a few years of intense study, and maybe it will make sense. very intriguing stuff nonetheless
The best way that I can explain it is that the framework (background elements, menus, and the rest of the interface) were all coded in Flash MX Professional. Actionscript 2.0 introduced a new file extention, .as (for Actionscript). The distinction between what is OOP and what is not becomes a lot less distinct when you start working with it, especially in Flash. OOP is just a way to take a set of things which have an existing relationship, give them a name, and formalize that relationship in a way that makes the resulting code cleaner and more efficient. When the application launches, it imports all of the class files, and creates an instance(object) of a class. That class in turn creates other objects. Some of those objects then import symbols from the Flash library, or external XML data, or entire other Flash movies. So the structure which drives the application is essentially all OOP, but the individual pages and elements are not.
Each page of content was first built in InDesign, converted to PDF, then to Illustrator. I know this sounds insane, but InDesign is the best tool for typesetting and page layout by far, and we had a lot of content to put together quickly, that had to also look good. From Illustrator, pages that needed to be interactive (with links) were converted to EPS and then opened in Flash to add links. The links are done with the most basic Actionscript, and are just attached to individual pieces of text within the Flash document. The pages which didn't need links were ripped to .swf format directly from Illustrator.
You can do OOP badly, and end up with classes (a class is the template for an OOP object) that don't really work that well together. You can do it well and end up with a application that is much more efficient than it could ever be as a non- object-oriented program. The thing that takes time and practice and a lot of head scratching is to know when something should be built as a class/object, and when it shouldn't. Someone mentioned the car example earlier. It seems simple. A car is an object. A car has wheels, therefore wheels should be a property of the car object, as should seats, steering wheels, color, make, model, and everything else about the car. A car is easy to think about because it's a concrete object, and something that everyone is familiar with. When you start thinking about more abstract objects - user interfaces, search engines, etc. - you find that it is far less intuitive to decide which elements should and shouldn't be members of a class. When you get to that point, look at design patterns.
I've actually just started trying to work some OOP into my PHP work. So far, I haven't found that much info on the subject. That's why I would recommend looking at Flash to start with. There's a lot more information out there.
Incidentally, my web site does not mix Flash with PHP. The web site is all PHP, Javascript, and HTML. Javascript actually does all of the work for the menus and the user interface. PHP is used mainly to pull info from MySQL and write it into the page. The only Flash is in the 2-3 portfolio pieces that use it.