It looks like you're using an Ad Blocker.

Please white-list or disable AboveTopSecret.com in your ad-blocking tool.

Thank you.

 

Some features of ATS will be disabled while you continue to use an ad-blocker.

 

Coding noob here

page: 1
1
<<   2 >>

log in

join
share:

posted on Jan, 7 2014 @ 12:32 PM
link   
I'm new to coding, and coding from an editor. I started with a graphical design program. Now i have a layout i like.

I have a few questions.

1) Css is a basic site template to store layout info? template.css, style.css, menu.css?

2) Php is a server side scripting language, it handles requests marked up in html?

3) My server side script should have a configurable section for DB queries and connect to db info?
(Username) (Password) (Localhost) of the DB?

4) I have two sets of css files. One in /htdocs/style and another in /htdocs/pcss. Whats the difference?


I cant post a link to my site due to TOS.

I'm pretty sure i cant post my code either.

I really want to learn this stuff.

Just picked up a couple servers and want to cluster them and host my site. That's for another day.
I'm proficient with hardware and networking. I need to get this next step down pat.

Calling all members and mods alike. I want to get a foot in the door.

I will be forever grateful to those who steer me right and true.



posted on Jan, 7 2014 @ 12:49 PM
link   
reply to post by shaneslaughta
 


If it helps? I generally use visual design interfaces, but it's impossible to avoid coding entirely so occasionally.. lol..

With that in mind? I think of it this way. HTML shows stuff. PHP actually DOES stuff. CSS determines what the stuff looks like for color, shape and design interaction with everything else.



posted on Jan, 7 2014 @ 12:58 PM
link   
reply to post by Wrabbit2000
 


So Css is in effect a visual translator with the ability to route requests to the PHP code, and visually display on the client side via HTML?

Php handles the actual DB lookups and such?

So many layers to this. On the outside it seems simple.

The deeper i go the more questions i have.



posted on Jan, 7 2014 @ 01:02 PM
link   
The internet....its more like an onion that you think.

Layers upon layers, the more you peel them back, the more you cry.



posted on Jan, 7 2014 @ 01:07 PM
link   
reply to post by shaneslaughta
 


HTML is structure.
CSS is presentation of the HTML structure.
PHP is Server Side (db, If else stuff, etc).



As to your CSS question... As long as the path to the css file is good, it should not matter.



posted on Jan, 7 2014 @ 01:07 PM
link   
I'm no code guru..like I said, I'm a gui guy that just has functional working ability with the text files some folks work exclusively in.

CSS is taking all the coloring and formatting out of the HTML files to make it central and common across a project though, as another way of thinking of it. A change in an HTML file to make a header a different color will change one line on a page. The same alteration in a CSS file will change every header of that type in the project.



posted on Jan, 7 2014 @ 01:15 PM
link   
reply to post by Wrabbit2000
 


I noticed that. I was changing the head meta name tag in the html. The changes only effected that page, and opening the css with the host still showed the original info.

So i should be editing the Css flies for layout and functionality. Then it should display the correct info in html?

I shouldn't need to edit the HTML much after they layout portion is done as most of the important parts are in the Css files?



posted on Jan, 7 2014 @ 02:11 PM
link   
I have noticed that the GUI i use creates the site, but malforms a lot of the files created.

If i open the programs templates instead of the ones created, i get a beautiful simple layout to work from.

Now i can see how the different parts interact.

Im referencing W3Schools for the finer points.

Any thoughts on a good HTML editor to use? One with error and structure checking?

Im currently using HTML kit tools.

Thanks for your help



posted on Jan, 7 2014 @ 05:48 PM
link   
reply to post by shaneslaughta
 


The program I am using the most these days actually requires a bit of extra work to add hand code at all, unless importing from another page or something. Wysiwyg Web Builder 9 is a visual design set up very similar to Visual Studio or Autoplay Media Studio for easy transition, if you've worked with either of those ..and it generates 100% of the code..so far, without a fail once for me.

Now the catch on that one I'll say up front. It's not free and the trial is fully functional but has a big ugly Trial Version floater down your screens. However, if you like how the trial functions (if you try it) I can say there are no surprises between that and the paid. Everything works as well and having bought that a couple years ago now? It's the only Web related program I've actually kept using continuously w/ fully paid upgrades right on-time.



posted on Jan, 7 2014 @ 06:10 PM
link   
reply to post by Wrabbit2000
 


Looks like WYSIWYG may be a real time saver. I'm checking it out now.

Thanks a bunch Wrabbit2k
Much appreciated.



posted on Feb, 23 2014 @ 12:28 AM
link   
Late reply, but hope it helps.

I highly suggest Sublime Text. If you work at the code level then definitely check it out.

On that note…. I suggest working at the code level


Unless you are using a a decent CMS chances are working visually isn't going to save you time as you'll find yourself going to the code to correct something often.

Are you using HTML 5? I would look up and adhere to the best practices there.

As another member said HTML is about structure. If you find yourself using HTML to color, or position, or anything that relates to the look or formatting then stop. Delete it and accomplish that in CSS.

Put your CSS in an external CSS file and reference it in the HTML. Avoid putting CSS within the HTML markup. As for your question about if you need to go back to the HTML after you got the structure mapped out. Yes, but not too often. You'll need to insert the classes and IDs within the HTML markup that calls upon the CSS rules you made. You'll probably put bits of PHP and Javascript/Jquery in as well…although those too will gave external files.

Spend some time learning CSS but really most CSS stuff is done by using the web developer tools and winging it hehehe I'd spend my time learning Jquery and PHP if I were you. PHP because it has so many learning resources. Python and Ruby have a friendlier syntax and good learning resources as well.

Are you a one many army? I myself just stick to HTML, CSS, and Jquery and leave the server side stuff to others.
edit on 23-2-2014 by Lucid Lunacy because: (no reason given)



posted on Mar, 24 2014 @ 08:31 PM
link   
1) Css is a basic site template to store layout info? template.css, style.css, menu.css?

yes, if you choose to show an element in HTML, you can for example set: all buttons should look green!
or all buttons that are in a form
css can also be used in the HTML files themselves without using an extra .css file
most changes can also be made directly in the HTML elements by adding, for example color=#12FF56, however you'd have to write it again on every element

2) Php is a server side scripting language, it handles requests marked up in html?

a link with ?variable=value&variable2=value2 or a submitted form sends data usable as $_REQUEST['variable2'] to the php file
php is a server sided scripting language where you can choose how the html page sent to the user will look like
it creates the code in the downloaded html file while its being sent, line by line

3) My server side script should have a configurable section for DB queries and connect to db info?
(Username) (Password) (Localhost) of the DB?

you don't need it, but thats how it's commonly done - if you gave your website to other people, they'll see its most likely in some config.php or config.inc, maybe in an "include" folder - so they can change the server address etc to their systems instead of yours

4) I have two sets of css files. One in /htdocs/style and another in /htdocs/pcss. Whats the difference?

this was the choice of whoever made the website - no need to do that
you can have multile .css files in one html file - you choose those by including them in head tags: link rel


if you want to be a true comp pro you've got to look at good, but unprofessional tutorials, skip most and learn from the example codes while thinking about possible background mechanics of the computer - i learned PHP that way in 30 mins when i was 9 years old and googled things when i needed them for the first time, though old ones might run into trouble, confusing programming for maths
and never use classes or OOP in php - they're only useful if you're paid for working longer - your customers might as well expect
you to make the code look *fancy* like that
if you want things to move on a visitors browser, you'll need _javascript - if you want less page refreshing you need _javascripts "ajax"
otherwise those website creating systems are really the best choice, though they'll limit what you can change your website to
edit on 24-3-2014 by oneoneone because: (no reason given)



posted on Apr, 20 2014 @ 11:53 AM
link   
Thank you for your information. Its been a while but im getting the hang of things now.

I cant just sit down and have at it. My work schedule is random.



posted on Apr, 25 2014 @ 10:00 PM
link   
May I recommend these tutorials

www.tizag.com...
www.tizag.com...
www.tizag.com...

These are the first three on the site. They then have tutorials for other topics such as JavaScript, PHP, MySQL and so on.

I started with these tutorials about 10 years ago in the very beginning and now here I am with a degree and a career in software engineering


Any specific questions feel free to message me and I will try to keep up to date with this thread as well and help out when I can

Cheers



posted on Jun, 11 2014 @ 12:07 AM
link   

originally posted by: shaneslaughta
I'm new to coding, and coding from an editor. I started with a graphical design program. Now i have a layout i like.

I have a few questions.

1) Css is a basic site template to store layout info? template.css, style.css, menu.css?

2) Php is a server side scripting language, it handles requests marked up in html?

3) My server side script should have a configurable section for DB queries and connect to db info?
(Username) (Password) (Localhost) of the DB?

4) I have two sets of css files. One in /htdocs/style and another in /htdocs/pcss. Whats the difference?


I cant post a link to my site due to TOS.

I'm pretty sure i cant post my code either.

I really want to learn this stuff.

Just picked up a couple servers and want to cluster them and host my site. That's for another day.
I'm proficient with hardware and networking. I need to get this next step down pat.

Calling all members and mods alike. I want to get a foot in the door.

I will be forever grateful to those who steer me right and true.


One of the many things you can do is get a web developer extension for your browser, chrome, firefox etc. and they will allow you to edit your CSS (style.css) in real time to see the changes instantly. This not only lets you see the desired effect but trains you on the proper coding techniques in CSS, plus they allow you to identify areas of css within the page for editing later. To understand CSS, realize that it is a formatting language, that is generally attached to a web page externally. Something that looks like . this little bit of code is placed in the head section of your page and applies the styles to the rest of the page or website.

Why this is so handy is lets say you have a html code on all of your pages and you would like this to be the color blue, rather than change it on every single code call out on every page you make it once in your stylesheet and the entire site changes. This is one of many advantages to CSS, but this single thing can save hours of coding on a large site.

I write and make changes to cascading style sheets with a text editor but dreamweaver is hard to beat for everything from layout to style sheets.

My two cents.



posted on Jan, 4 2015 @ 11:32 PM
link   
I also used to get my websites done with CMS like Wordpress. Now, I am learning how to code from scratch. I use Sublime text editor. Do not use Dreamweaver. It will not help you master the syntax of the code. If you will get used to it, you will be always dependent. CSS and HTML are for the layout and design. PHP, is for the functions and process, like the login, registration, etc. Javascript, jquery, etc., are for cool effects, like slideshow and modal window.

edit on 4-1-2015 by heatherIDD because: (no reason given)



posted on Jan, 5 2015 @ 01:36 PM
link   
+ 1 for Lucid: www.abovetopsecret.com...
get to know the text behind your WYSIWIG. If you don't know what the tool is really *supposed* to be doing, you have much more to learn when they don't do what you want them to do.

Also, you tend to end up with *much* leaner files (perhaps at the cost of honoring standards).


MarlinGrace's comment about a web-inspector and CSS editing is also a good one. Saves a LOT of "Edit/save/reload". The changes are immediate; once you've got what you want, you can copy it to your real code.


One point I'd like to make to help with the distinction between HTML and CSS - HTML provides content and structure (which includes something like default rendering), CSS allows you to extend or even override the rendering.



posted on Aug, 27 2015 @ 07:14 PM
link   
Nice thread - might as well add my thoughts.

We insert php code into a html file and that code is expanded or replaced with a result generated by the php processor. Php is doing serious work on the server side, yes, accessing databases and such. Your browser simply requests a webpage, the server knows what needs done usualyl because of the extension of the requested file (.php). The php is processed before the stylesheets are loaded, so we could, if we wanted, use php to select one or more of many stylesheets. Some sites work like that, you can quickly change the layout and theme of an entire site by simply changing a variable to point to another sheet or group of sheets.

For example, you might include some php in the head section of your html file that selects a specific .css file. I've written applications like this - say, for example, the user can set a parameter in the URL to specify a sheet. That's not recommended because it might raise some security concerns but it serves s a pretty good example of how these technologies interact and the order of how things are done.

We might say the user can pass a value such as ?cssfile=pathtocssfile so that the user can select a particular file provided they know the relative path. We'd use php to extract the parameter and generate the path to the file, and output the resulting html tag.in the head section that will include the selected file.

We'd do something like

echo '<link rel="Stylesheet" type="text/css" href="pathtocssfiles/" . $_GET['cssfile'] . ">';

Passing the ?cssfile parameter allows us to access that value in php via $_GET[], which can be handy.

Since we're outputting a result (echo is used to print) then the php code in the html file will be replaced by the result - so essentially the line becomes an html tag. So we can use php to carry out various tasks, like query databases, select what content to display, set up user sessions, work with cookies and also generate html, css, _javascript...the possibilities are mind boggling so don't waste too much time dwelling on the vast magnitude of it all.

Php is an interpreted language and is fun and worth learning. Pick a few things that appeal to you and work on them, you'll never learn everything but it should be fun, don't let it overwhelm you.
edit on 27-8-2015 by HeathenJessie because: (no reason given)



posted on Aug, 27 2015 @ 07:15 PM
link   
a reply to: HeathenJessie

P.S.

As I've just joined and this is the first real thread I've replied to, you can be the first person to have a flag from me. As soon as I'm able to give you one that is.

Enjoy.
edit on 27-8-2015 by HeathenJessie because: What? I can't flag this guy?



posted on Aug, 27 2015 @ 07:41 PM
link   
a reply to: HeathenJessie

You should be able to flag now. Just click the flag icon at the top left of the thread.




top topics



 
1
<<   2 >>

log in

join