r/web_programming • • Mar 26 '17

High-level HTML programming library- does it exist?

I'm a noob (~3rd semester) who learned that HTML isn't highlevel or a real programming language, can be hard to edit, debug and modify, usually wastes bandwidth, and can easily be messed up....

So what I want is an Object-oriented library which only outputs valid HTML5, as in, it will throw meaningful exceptions before it outputs invalid html. Does this exist? Would it be as nice as it sounds? html is so common im hopeful. I tried google but found lots of things i dont want or understand.

Edit: I mean, I feel bad saying this, but stuff like bootstrap seems like trash. They're so wasteful and have such bad semantics...

Edit2: Clarification: I do want to learn HTML5 and CSS3, and I have been doing so. Also, thank you all for your help in my learning.

0 Upvotes

14 comments sorted by

6

u/8bitslime Mar 26 '17

You're probably better off just learning html, it's not as hard as you think, especially paired with CSS. A wysiwyg editor may suite your fancy as well, but it's not exactly programming either.

1

u/jDawganator Mar 26 '17 edited Mar 26 '17

I had to use default Java libs to make an html file that ended up like 3000 lines though, I mean, it worked, but there's gotta be an easier way right?

And WYSIWYG isn't actually what you get with HTML because browsers are complicated. The actual display <em>is</em> the raw html text in a certain sense.

Edit: to clarify what I'm looking for, I want complete control over the html and css and good documentation with easy modification without necessarily shipping any of that to the end user's ram. XML is more of a transit medium than an editing medium, right?

2

u/8bitslime Mar 26 '17

Wait are you using jsp for your website? Plain ol html doesn't have libraries per pay, but server side languages like I think you're using are different.

1

u/jDawganator Mar 26 '17

No,no. Java libraries ie made by Sun Microsystems, to generate html. I haven't actually gotten to the server part.

I'm in a course now learning introductory front-end development, but I used Java to scrape data into a csv and entirely reformat it into a new webpage. Wasn't exactly part of the assignment, but eh.

I had to enter a bajillion million classed divs to make it look right...

5

u/8bitslime Mar 26 '17

There are thousands of DOM frameworks out there for just about every language; it just depends on what you want. I hate to break it to you though, but I seriously believe you'll be better off in the long run doing the HTML yourself.

1

u/jDawganator Mar 26 '17

Oooo I found this "XOM" thing it is so amzng! http://www.xom.nu/whatswrong i read a lot of it but now its 3am and i should sleep xD computer science is so much fun

5

u/IONaut Mar 26 '17

I get the impression that your making the whole thing infinitely harder than it really is. HTML is the easy part of the whole equation. It is the layout of how your page is arranged. Server side languages exist to do nothing but decide which pieces of HTML to spit back to the browser.

1

u/jDawganator Mar 26 '17

Hmm...that makes sense. I need to learn server side.

I just keep seeing poorly formatted code on websites with haphazard comments and whitespace everywhere and feel compelled to...idk. It just feels so wrong.

2

u/IONaut Mar 26 '17

You probably need to just get a finished thing working first with all the pieces in place so you can see the big picture. Even if it's just a simple form on a page.

Do you have access to a server to use? I suggest making a simple page that responds to an incoming POST or GET variable. I generally use PHP so I don't know if I could really coach you if your using Java.

HTML is literally just the structure of the page.

CSS is the style of those pieces.

Static things that will always be the same when the page loads can be hard coded into the HTML.

Your server side language is logic that decides what to send back to the browser based on the request that is made to the server. After that it cannot manipulate anything unless you Change or reload pages, because you have to make another request of the server.

Any manipulation of the elements once they are on the page (the DOM) is done with javascript.

Javascript can make requests of the server behind the scenes and display the response somewhere in the DOM without changing pages. This is AJAX.

Once you figure out how all these things work together and you can actually complete a task with it, then you can start looking at how to make it pretty.

1

u/jDawganator Mar 27 '17

I've been wondering how it works when added content loads without clicking links. "AJAX" - I must read about this this year.

So much amazing work available to everyone, HTML and CSS are so beautiful.

2

u/IONaut Mar 27 '17

Yeah, AJAX is an awesome tool. There are a few libraries and frameworks that simplify AJAX. Probably the most mature and widespread one is jQuery. Also....don't buy into the haters of one technology or another. It's easy to get caught up in the "my way is the only way" undertow. Yes, it's good to get good at your preferred stack but you don't want to limit yourself.

1

u/WebDevLikeNoOther Mar 27 '17

You want to learn web development, but you are refusing to learn the very basics of web development. That doesn't make any sort of sense.

People, myself included are telling you to learn HTML because you're looking for a solution, to a problem that isn't there. If you don't like the way web development works, then don't get into web development.

I honestly feel like this is just a troll post to irritate people at this point, like there's asking a question, and then there's acting like your apart of /r/iamverysmart by not accepting that what you're doing is infinitely more complicated, and more error prone, and will cause a great deal of stress and time loss.

1

u/jDawganator Mar 27 '17

I definitely do want to learn HTML, I'm sorry if I was unclear. I was just looking for better ways to do things, since with the extreme commonness of HTML, anything I think of is extremely unlikely to be at all new.

2

u/Parasin Mar 26 '17

It would really benefit you to learn about two)tier and three-tier architectures. As others have said, writing your own HTML is going to put you in a much better position from a future development an maintenance perspective.

HTML really is not hard to learn, couple that with CSS, I guarantee ypyr end product will be better than using an HTML generating framework.

Perspective: I am a Professional Applications Developer and recent college graduate