Having trouble wrapping my head around this

Developing a webpage and the steps of the process

Page 1 of 1

14 Replies - 885 Views - Last Post: 16 March 2010 - 04:47 PM

#1 guyfromri  Icon User is offline

  • D.I.C Addict

Reputation: 46
  • View blog
  • Posts: 817
  • Joined: 16-September 09

Having trouble wrapping my head around this

Posted 14 March 2010 - 07:28 PM

Ok, so let me start by saying I'm a VB6 programmer and I have been studying HTML, CSS, PHP, Javascript and SQL. These languages are learnable and with enough Q&A I could make them do what I want. I am having a problem wrapping my head around the process though. Obviously I'm going to start by making a page with HTML. Then I put in the PHP aspects that I want such as a login script. I am going to have to use CSS (z-index) for the image positioning that I want as well). This stuff I am currently learning. But if I wanted to have something that I could post news to. Obviously I don't want to have to re-code everytime that news is going to be posted. I'll make a form, similar to whats hear, and tell it where to post the news but in the process should I be saving the news to a database somewhere? How do I tell my page that when I hit Submit I want this to show up at the top of the page. Could someone give me an idea of where I can do some research on interactive websites. I want to make something interactive for my guests but the whole concept seems hard for me to grasp and I don't really know why. Thanks in advance for your help and advice.

Is This A Good Question/Topic? 0
  • +

Replies To: Having trouble wrapping my head around this

#2 Lemur  Icon User is offline

  • Pragmatism over Dogma
  • member icon


Reputation: 1370
  • View blog
  • Posts: 3,457
  • Joined: 28-November 09

Re: Having trouble wrapping my head around this

Posted 14 March 2010 - 09:19 PM

I wouldn't be the best at this due to lack of serious php knowledge but here we go.

Yes, you should put everything in a database, and submit it using a rich text editor such as the one you see here, but there are quite a few that are free so don't bother reinventing the wheel to that note.

Relative positioning is how you would manage the images, just make each news element go into a div container, the image will be relative to its native position though.

As far as the div section for news, try a section like this:
<div id="news">

<!--PHP here to generate news item containers like below-->
<div class="news_item">
<!--news here-->
</div>

</div>



You may also look into pagination for that, but overall the concept you're looking for is the creation of a CMS or content management system, in which case I'd believe this to be better suited to the PHP forum.
Was This Post Helpful? 0
  • +
  • -

#3 Craig328  Icon User is offline

  • I make this look good
  • member icon

Reputation: 1926
  • View blog
  • Posts: 3,471
  • Joined: 13-January 08

Re: Having trouble wrapping my head around this

Posted 15 March 2010 - 06:51 AM

Okay. What you're talking about is a dynamic website. Dynamic in that what you see is driven by data and that when the data changes, the output to the site changes. This is all done by accessing some form of data whether it be a database, an XML document, an RSS feed from a web service, whatever.

Conceptualizing how it works really isn't difficult. Take this HTML for example:
<table>
    <tr>
        <td>HELLO WORLD!</td>
    </tr>
</table>


That's what you call static HTML. Whenever that code is called by a browser, you'll get the same thing everytime (Hello world!).

Now, a dynamic site would replace the "HELLO WORLD!" part of that with something called a variable. A variable is basically a named object that holds data. In this case, a text string. Take that same HTML page but above it you would have your code retrieving a piece of data (a string) from the database, XML document, RSS feed or whatever and making the value of the variable you're creating the equivalent of whatever the piece of data is you just retrieved. Then, instead of outputting "HELLO WORLD!" you have your application server interpret the variable and output its value in place of that static text string. Development languages like PHP, ASP, Perl and Coldfusion all do this. They all look different but they all do the same thing. The trick here is that each of those development languages interprets code and outputs the HTML end product whereas with the static page, the HTML IS the code so no middle interpreting language engine comes into play.

There are a great many resources on the web that can explain that much better than I just did. PHP is probably the most common language resource out there so start with that.

Good luck!
Was This Post Helpful? 0
  • +
  • -

#4 Lemur  Icon User is offline

  • Pragmatism over Dogma
  • member icon


Reputation: 1370
  • View blog
  • Posts: 3,457
  • Joined: 28-November 09

Re: Having trouble wrapping my head around this

Posted 15 March 2010 - 04:47 PM

@Craig328 - Either you're really new or you're unaware that tables are fighting grounds around here. As far as the rest of his explanation fair enough but DO NOT use tables for design, EVER. Either use CSS positioning or floats, you'll save yourself hours of headaches, and if you want to know WHY tables are bad check this tutorial I wrote in the HTML Section: The Evil Of Tables

http://www.w3schools is probably your best bet for learning PHP basics.
Was This Post Helpful? 0
  • +
  • -

#5 Nykc  Icon User is offline

  • Gentleman of Leisure
  • member icon

Reputation: 729
  • View blog
  • Posts: 8,642
  • Joined: 14-September 07

Re: Having trouble wrapping my head around this

Posted 15 March 2010 - 04:59 PM

While I absolutely agree with your statement Lemur, every book I read in regards to php teaches the use of displaying data in tables.

Also tables are ok for that purpose, displaying data only! As far as layouts are concerned, it is mortal sin to use tables and you should be stoned to death for thinking it is ok.
Was This Post Helpful? 0
  • +
  • -

#6 Lemur  Icon User is offline

  • Pragmatism over Dogma
  • member icon


Reputation: 1370
  • View blog
  • Posts: 3,457
  • Joined: 28-November 09

Re: Having trouble wrapping my head around this

Posted 15 March 2010 - 06:58 PM

Which is what I was inferring though I guess that wasn't very clear. I'll have to watch that one.
Was This Post Helpful? 0
  • +
  • -

#7 Craig328  Icon User is offline

  • I make this look good
  • member icon

Reputation: 1926
  • View blog
  • Posts: 3,471
  • Joined: 13-January 08

Re: Having trouble wrapping my head around this

Posted 15 March 2010 - 07:26 PM

View PostLemur, on 15 March 2010 - 03:47 PM, said:

@Craig328 - Either you're really new or you're unaware that tables are fighting grounds around here. As far as the rest of his explanation fair enough but DO NOT use tables for design, EVER. Either use CSS positioning or floats, you'll save yourself hours of headaches, and if you want to know WHY tables are bad check this tutorial I wrote in the HTML Section: The Evil Of Tables

http://www.w3schools is probably your best bet for learning PHP basics.


Not new (in fact, been here longer than you). Not unaware of how some are with tables. Am aware that someone brand new to development would more likely recognize the standard table setup as opposed to attributed divs and/or spans...especially for simple example purposes.

As for "fighting grounds" perhaps you should be introduced to the concept of having to code an app that displays well not only on the latest and greatest browsers but also some more ancient, arcane ones as well. While CSS is nice and all, it's adoption is neither comprehensive nor universal through several versions of existing browsers. Just like any other tool, tables have their place and their strengths and they are almost always introduced well in advance of CSS in the learning curve.
Was This Post Helpful? 0
  • +
  • -

#8 Lemur  Icon User is offline

  • Pragmatism over Dogma
  • member icon


Reputation: 1370
  • View blog
  • Posts: 3,457
  • Joined: 28-November 09

Re: Having trouble wrapping my head around this

Posted 15 March 2010 - 07:46 PM

Arcane browsers that make up less than 1% of the market share are completely irrelevant to anyone marketing online because the people using these antiques probably don't know much if anything about the internet and much less chance they know or trust using their credit cards on those sites.

So you encourage bad practice, ancient coding, and something that its own creator dismissed as a design medium?

Been here longer or not it's sheer incompetence to say that CSS isn't practical. IE 5+ supports CSS well enough to get basics done and do you really think that anyone uses that let alone anything older?

If CSS is too hard or far on the learning curve then you have absolutely no place in Web Development. CSS is the structure of the modern web and as such needs to be taught soon in the process...

As far as Web Standards you have no place either. I suggest you stop reading this unless you want to know what I mean, and I intend to go in detail as to why, fair warning...

@OP Ignore below

----------------------------------------

Spoiler


----------------------------------------


To the OP:

Tables are only to be used for data like you would find in excel, use this as a rule of thumb and you should be good to go.
Was This Post Helpful? 0
  • +
  • -

#9 Craig328  Icon User is offline

  • I make this look good
  • member icon

Reputation: 1926
  • View blog
  • Posts: 3,471
  • Joined: 13-January 08

Re: Having trouble wrapping my head around this

Posted 16 March 2010 - 07:54 AM

Wow. Where to begin? Well, since you dispensed with any facade of civility I'm tempted to do so equally. However, I'll try to keep this as professional as possible and perhaps you might learn something from the exchange. To address your "reply" in point form:

- "Arcane browsers that make up less than 1% of the market share are completely irrelevant to anyone marketing online" That's great. Also, completely irrelevant to the point I made that you were apparently responding to which was "perhaps you should be introduced to the concept of having to code an app that displays well not only on the latest and greatest browsers but also some more ancient, arcane ones as well" You see, I get it that you're young and believe that what paltry amount of actual professional experience you possess, if any, leads you to conclude that you can form an authoritative opinion on matters. To wit, you clearly either suffer from a reading disability or clearly don't know the difference between an "application" and "marketing online". I'll give you a hint: they're not the same thing.

Equating what passes in your world for excusable omissions doesn't cut it when you have a client paying you a great deal of money to build a working application that, in turn, serves his customers who, for whatever reason, want to still use things like Netscape, AOL, Konqueror and other arcane browsers...and even proprietary browsers that are custom made to serve their particular purpose or perhaps even a single app...like the ones I write. Your blithe dismissal as them not being up to speed with your view of the world is immature and incredibly short-sighted. You can get away with that in college while you're playing at making pretty sites and reading books all the live long day that support your particular view of the world. Good luck with that attitude upon graduation.

- "Been here longer or not it's sheer incompetence to say that CSS isn't practical. IE 5+ supports CSS well enough to get basics done and do you really think that anyone uses that let alone anything older?" Yeah, I do as per my reply above. And sheer incompetence isn't something you're in any position to declare. 19 years old with a resume that gleefully declares how you "were into" computers in high school really gives you no platform to pass judgment on the skills of others...particularly when those others have "been there, done that" and you haven't. You'd be well advised to cultivate a less arrogant personality when dealing with your peers. You'd be REALLY well advised to ditch it altogether when speaking with someone whose been "into" computers since before you were born and been a gainfully employed professional in the field since long before you stopped picking your nose in public.

As for the rest of your ill-informed diatribe/love affair with CSS, I'll let you in on a secret: eLuncher uses a template I pulled down from the web for the front end. Not mine, kid. If I had the man's email address handy I'd give it to you so you could fire off an indignant email to him and tell him how his online business of selling ready-made site templates is an abject failure. So, to recap, not my work. Did allow me much time to code the database, stored procedures, triggers, RSS feeds, scheduled tasks, user and customer management systems, syndication CMS...and all the other things that you, as a web designer, would have absolutely zero clue about. In short, as a coder, you can't even carry my jock.

The app primarily involves doing things like managing upwards of 10K users per day to the site (who, hey guess what!...use browsers even OLDER than your IE5 example) who come there to browse over 930,000 listings, getting real time information about anyplace in any of the 50 states, taking in new paying customer info through a web 2.0 interface that uses Ajax rather heavily that, coincidentally enough, doesn't play well in places with CSS on certain browsers, folding/spindling/mutilating that data to reform into approximately 7500 emails per day to interested users, providing content syndication to more than 10 other sites...so and so forth...you might get the idea. Your assessment of an application that's well on it's way to generating more money in a month than you'll ever likely make in a year of CSS blathering is less than meaningless to me...and it works for pretty much EVERY SINGLE BROWSER OUT THERE. It's been deliberately built the way it is for that very purpose. Since you mentioned "marketing online" you should be familiar with the number 1 rule for that: "your personal hubris/code arrogance does NOT mean more that the customer experience". That would mean ALL customers, kid...not just the ones who have the latest browsers.

So, to recap: CSS is nice, tables ARE more widely supported and my example you took exception with was entirely appropriate while your response did nothing but highlight your self-aggrandized opinion of your own design prowess while equally showcasing your exceptionally narrow vision when it comes to what is actually out on the web as opposed to what you think is out there.

Oh, it also displayed a remarkable lack of tact, thought, experience, and respect. Nice personality combo you got going there. And trust me, my site will "suffer" along nicely until the summer redesign that's slated. It's nicely paying my mortgage, car payment and two trips for the family so far this year...for something I work perhaps 5 hours per week total on. I'll try and assuage my grief with it's success...if that's okay with you.

Have a nice day. Don't be late for class.
Was This Post Helpful? 0
  • +
  • -

#10 Lemur  Icon User is offline

  • Pragmatism over Dogma
  • member icon


Reputation: 1370
  • View blog
  • Posts: 3,457
  • Joined: 28-November 09

Re: Having trouble wrapping my head around this

Posted 16 March 2010 - 11:47 AM

@Staff - A note, I am aware that I'm pushing it but I don't intend to reply after this and leave it at this. Any further will be conveyed via PM or other media </hint>

Spoiler

Was This Post Helpful? 0
  • +
  • -

#11 KYA  Icon User is offline

  • g++ jameson.cpp -o beverage
  • member icon

Reputation: 3102
  • View blog
  • Posts: 19,142
  • Joined: 14-September 07

Re: Having trouble wrapping my head around this

Posted 16 March 2010 - 01:10 PM

What is the point of wrapping your thoughts into spoiler tags?


If you're going to say it, then say it.
Was This Post Helpful? 0
  • +
  • -

#12 PsychoCoder  Icon User is offline

  • Google.Sucks.Init(true);
  • member icon

Reputation: 1641
  • View blog
  • Posts: 19,853
  • Joined: 26-July 07

Re: Having trouble wrapping my head around this

Posted 16 March 2010 - 01:17 PM

View PostCraig328, on 16 March 2010 - 05:54 AM, said:

"perhaps you should be introduced to the concept of having to code an app that displays well not only on the latest and greatest browsers but also some more ancient, arcane ones as well"


While I agree with a lot of what's been said in this thread I draw the line here. I've been doing contract work for many years now, and I let my clients know up front that I will not code for old or custom browsers. Old being IE 5 or older. It's 2010 and we have to draw the line somewhere, and trust me it hasn't cost me a single contract yet.

I am a professional developer, for both web and Windows, and absolutely refuse to spend the time it takes to make something work for the few in this world who absolutely refuse to catch up to the rest of us. If you use Netscape, AOL, IE 5 (and older) then as far as I'm concerned you're just SOL if you're wanting to view something I developer, and I personally have no issue with this stance whatsoever (and apparently neither do my clients). If someone wants to stay in the stone ages then there are consequences for that decision, plain and simple.

OK, I'm off my soapbox now :)
Was This Post Helpful? 0
  • +
  • -

#13 Craig328  Icon User is offline

  • I make this look good
  • member icon

Reputation: 1926
  • View blog
  • Posts: 3,471
  • Joined: 13-January 08

Re: Having trouble wrapping my head around this

Posted 16 March 2010 - 01:50 PM

It makes one feel clever I suppose. I didn't bother to click it.

Regardless of the invective, it's not arguable that table structure gets taught before CSS and because I thought I was replying to a relative novice, felt that displaying it in a familiar form would be helpful.

I'll admit to being entirely uninterested in the views of a web designer about web design when the original question had zero to do with it. I'll further admit that I get that some people can be very "into" what they're doing and can't fathom that because they've come to an earth-shattering conclusion (for them) that not everyone will share their wonderment or even agree with their conclusion. I get that too. But I also have to admit to not appreciating the somewhat personal turn the thread took when it started featuring words and phrases like "incompetence" and "encourag[ing] bad practice". I was prepared to let that slide due to the obvious ignorance, youth and inexperience of the poster.

However, I draw the line at tolerating a crack like I "have absolutely no place in Web Development" when I'm the one who's been there and done that and the other guy freely admitted that he's not the authority due to his lack of knowledge. I've literally forgotten more about developing for the web (not designing) than the other guy knows and while I, on a daily basis in real life, humor the folks who are tasked with taking what I and my staff build and making it pretty without breaking functionality, I won't put up long with one of them believing they can take me to task about requirements gathering, planning, architecting, staffing, building, testing, debugging, QA'g and finally deploying a serious piece of web software...the things that ACTUALLY comprise web development. CSS and web design are literally the smallest, least significant pieces of that whole picture. They have their place certainly but they don't trump the parts that actually, you know, do something.

I want to apologize to the original poster of this thread. I should have been more mature and simply ignored the other guy and his ranting. If you want to know more about dynamic sites and such, please feel free to ask and I'll be happy to lend an opinion where I can contribute something to the thread.
Was This Post Helpful? 0
  • +
  • -

#14 Craig328  Icon User is offline

  • I make this look good
  • member icon

Reputation: 1926
  • View blog
  • Posts: 3,471
  • Joined: 13-January 08

Re: Having trouble wrapping my head around this

Posted 16 March 2010 - 02:03 PM

View PostPsychoCoder, on 16 March 2010 - 12:17 PM, said:

While I agree with a lot of what's been said in this thread I draw the line here. I've been doing contract work for many years now, and I let my clients know up front that I will not code for old or custom browsers. Old being IE 5 or older. It's 2010 and we have to draw the line somewhere, and trust me it hasn't cost me a single contract yet.

I am a professional developer, for both web and Windows, and absolutely refuse to spend the time it takes to make something work for the few in this world who absolutely refuse to catch up to the rest of us. If you use Netscape, AOL, IE 5 (and older) then as far as I'm concerned you're just SOL if you're wanting to view something I developer, and I personally have no issue with this stance whatsoever (and apparently neither do my clients). If someone wants to stay in the stone ages then there are consequences for that decision, plain and simple.

OK, I'm off my soapbox now :)



Fair enough. I know lots of folks like you. Let me tell you a quick and true story to illustrate a counter concept.

Right now, I'm doing a contract for a transport facilitator. That is, they act as a clearing house for transportation/shipping options and have clients who are trucking companies, maritime shippers, air shippers, etc. While THEY are up to speed on things, their customers most certainly are not. Those customers pay them good money to act as their shipping department and those customers span a wide range of industries. If they have a customer who will do a few million dollars of business with them per year and their internal IT infrastructure still has them using...oh...say Netscape, guess what, the client says "yes sir" and makes it happen.

While folks like you and I have the option to pass on individual contracts my client does not. Do you know what happens if he does do that? Somebody else shows up and services that account and they lose business. If you think coding something to an ancient standard is bad...you would really cringe if you had to deal even 60 seconds with the myriad ways they want to send and receive data. This, however, is the nature of business. I'm sure pretty much everyone knows that COBOL and FORTRAN are ancient languages but do you have any idea how much a competant COBOL and/or FORTRAN developer makes per hour? Last guy I knew who did that kind of worked charged $200/hr and had to turn business away.

Just because something is old doesn't mean it's worthless or can be safely disregarded. For every contract you'd refuse to do because it's not "modern" is work for someone else. And when I have someone paying me $60 per hour to code something to an old standard (and I've enjoyed a couple of those) it's all good for me that others disdain that kind of thing.
Was This Post Helpful? 0
  • +
  • -

#15 Lemur  Icon User is offline

  • Pragmatism over Dogma
  • member icon


Reputation: 1370
  • View blog
  • Posts: 3,457
  • Joined: 28-November 09

Re: Having trouble wrapping my head around this

Posted 16 March 2010 - 04:47 PM

I'll work down for IE5 but be sure I charge extra, not out of spite per-se but rather because it takes more hours to get it to function correctly and I have to pull out my old CSS Hacks reference.

As far as design being unimportant it's more like this: Take a coin, anyone can say one side is more valuable than the other but each side has its value and both are required to make a whole. Without good design a great program becomes annoying, an eyesore, and drives people away. Without good backend people stare in wonder for maybe 5-10 minutes then get bored and leave. Without one the other can't survive.

The reason I'm so up on CSS is not because it's new, hip, and modern or any such other triviality, but because it's faster, more convenient, and drastically smaller.I designed a site in tables and a site in css and the total size I believe was about 5-6x more on the table layout easily because of the extra tags and inline styling.

An external stylesheet can take a single html page and make it do next to anything, check out CSS Zen Garden's demonstration of the topic. No need for font tags, anything can be moved to any position on the page by one sheet rather than redoing an entire table based layout. This also allows for sprites to be used, saving even more space.

If by nothing else the cost of Bandwidth for your site currently, lets say your page weighs in at 50kB and a CSS goes around 20kB. While minuscule on a smaller site that can really add up quickly. Bandwidth usage can cost extra money and really burn in the long run.

At 10k visitors at 1$ (flat rate) per gB worth of Bandwidth:

Tables
~.5gB or 50 cents

CSS
~.2gB or 20 cents

Small, rather pointless for just a day, but lets take in sequence month, year, 5 year, and 10 year.

Tables
15.50$ - 182.50$ - 912.50$ - 1,825.00$

CSS
6.20$ - 73.00$ - 365.00$ - 730$

And this is talking about a single page, table based sites for about 20 pages vs css at the same weight, there's no comparison.

Combined with images that are probably not web-optimized or not in a sprite-set (for icons) and that can add up to around 100-300kB extra fairly quickly.

So lets take 10 years at 20 pages with tables using no sprites or optimized web imagery:

Tables
(1,825.00$ + ( 730,000(or 200kB @ 10 years) ) ) x 20 = $14,636,500

CSS
730$ x 20 = 14,600$
or with bad images
730,730$ x 20 = 14,614,600 which is still 20,000$ down the drain

By choosing to use archaic browsers the company is losing money, and it's not a small amount either. We're talking about losing 20,000$ to even a few MILLION because old browsers are sticking and bad habits aren't fixed.

It's not out of preference necessarily, tables cost large sites a LOT in the long run. The larger and more inflexible the source the more this can cost you. It's just completely impractical to try and support any longer by even business standards.

THAT is the main reason I'm no fan of tables.

I could go on for a lot longer on this one but I have no intent to, I have to get back to class :rolleyes:

Check Smashings post: http://www.smashingm...ll-to-div-hell/

This post has been edited by Lemur: 16 March 2010 - 04:55 PM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1