Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (732)
Games in Android Showcase (221)
games submitted by our members
Games in WIP (806)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  HTML/CSS Is Gross  (Read 5561 times)
0 Members and 1 Guest are viewing this topic.
Offline Hydroque

JGO Coder


Medals: 25
Exp: 5 years


I'm always inspiring a good time.


« Posted 2016-08-17 01:29:22 »

These two languages packed a punch and allowed for a great amount of good looking website to be created. There used to be a push for flash websites, but everyone noticed that they were too bulky and a lot of internets couldnt download them in a reasonable time. They ended up very clunky and many versions not supported by mobile, etc.

One great thing about flash was the flexibility it had, though. They looked great, and worked even better - due to having an ActionScript 2.0/3.0 environment. With plain HTML, I have to say its good if you just want to display something with elements going top to bottom, but I'd argue that BBCode, markup, etc would be better for that target - that is, if it actually replaced html, not translated to HTML. HTML is a nightmare when it comes to multiple columns of data to be displayed - which thats all that needs to happen anymore. The height is ignored due to the way its supposed to expand and everything is line oriented. I don't think it needs to be line oriented.

HTML gets really neat when you start thinking about defining higher level things... like an integer that scrunches the body by constraining it to 800 pixels width, or a boolean, which would ignore the width/height of the scroll bar on center. But if you notice, this has nothing to do with the format of the code. It has to do with whats available, and how it is implemented. The above have hacky ways of implementation. The body tag gets its browser defaults wiped and margin is then set to
margin: auto;
to be centered. Without creating html elements to get the size of the scroll bar, or detecting if there is a scroll bar, you would be left without a solution. It's not a must to use jQuery. This is a very hacky way, and it should be changed but it hasn't... strangely. This has been a many year old thing.

More on that, you have to do the above with CSS and JavaScript, actually manipulating elements on the get go. JavaScript uses DOM to manipulate the elements. While DOM is a smart idea, everything is implemented in a poor fashion. If I create an element I am reliant on using the id tag and there being a lose engine behind it. Why isn't it so where you would just set the element to a variable and manipulate it accordingly? I am going to mention the API isn't pretty for doing so...
document.getElementById("WhateverElement").classList.add("className");
A single liner, too. Fortunately, you can set the element to a variable, which goes away very soon out of scope, even defining it globally. Its strange that you have to create variables with these elements after getting them from an unreliable resource, which is unreliable because it doesn't guarantee that the element is there.

I want a total makeover, though. HTML is ugly to write in and prone to a lot of placement errors.

I kind of want to propose the idea that a header create the elements (think of C header), markup is completely removed, and the page is styled in a similar way to CSS, where you would group different changes. This area includes creating variable/handles to resources to be loaded. If it should be loaded dynamically, then the script engine should take care of that.

The header would handle parents and introduce the ability to create elements. An example of this would be creating two image boxes side by side, one spanning the length of the page. To the left there is an image, to the right - there is the box which could hold the title. It should lay out (java interface term) defaults for the page.

Instead of the element having being manipulated by ID or class lists using CSS, each element will have an empty table that will be added to where the key would be the element to change, and the value would be the thing to change. There is also, like I said before, have predefined lists which can be added onto eachother, like a matrix stack.

Playing off the header, comes the markup section... where there isn't any markup. This is the place where the parents are defined and scripts which defines your environment. The script also gives life.

That being said, all of these stuffs are linked via the header and scripts are run first before elements are loaded. There is a good reason for this, and its to enable dynamically setting up the page on the client side. Then the page gets set up. Then the functionality scripts get executed. Then the media resources download and show.

What better to do this in than Java? Stating my issues is all I'm doing. I don't think I will take on this :/

You think I haven't been monitoring the chat? http://pastebin.java-gaming.org/c47d35366491fHere is a compilation <3
Offline DarkCart

JGO Kernel


Medals: 121
Projects: 9
Exp: 50 years


It's all in the mind, y'know.


« Reply #1 - Posted 2016-08-17 01:57:58 »

What the f**k did I just read.

The darkest of carts.
Offline wessles

JGO Kernel


Medals: 326
Projects: 4


All coding knowledge will be useless at peak oil.


« Reply #2 - Posted 2016-08-17 02:31:25 »

Just use templates and JQuery like the rest of us.

RFLEX.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Hydroque

JGO Coder


Medals: 25
Exp: 5 years


I'm always inspiring a good time.


« Reply #3 - Posted 2016-08-17 02:56:13 »

But I dont want to use templates and jQuery. Unlike a lot of people, I've been learning, I like to actually code stuff ._.

You think I haven't been monitoring the chat? http://pastebin.java-gaming.org/c47d35366491fHere is a compilation <3
Offline theagentd
« Reply #4 - Posted 2016-08-17 03:58:56 »

*looks at URL*
Nope, this IS JGO, not Hydroque's blog.

Myomyomyo.
Offline Opiop
« Reply #5 - Posted 2016-08-17 04:43:33 »

I was going to post a helpful reply until I noticed who the OP is. Quit your whining and learn the damn markup syntax, millions of people make do with it. If you don't like it then create something better to replace it. I challenge you to do it.
Offline HeroesGraveDev

JGO Kernel


Medals: 382
Projects: 11
Exp: 4 years


┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻


« Reply #6 - Posted 2016-08-17 04:44:05 »

#1 problem with HTML/CSS is that content and layout aren't seperated the same way styling is.

But that's what template libraries are for. Problem solved.

Offline Mac70
« Reply #7 - Posted 2016-08-17 06:03:24 »

Templates and JQuery are a way to go nowadays. Smiley I didn't seen any serious code NOT using them since years, they just make layout/code a lot cleaner while not abstracting both too much.

But I still hate JavaScript anyway... I wish we had any viable alternatives that aren't as limited as Haxe or are just JS extensions.
Offline gouessej
« Reply #8 - Posted 2016-08-17 07:53:00 »

Hi

If you really want to use Java instead of HTML/JavaScript/CSS, you can have a look at HtmlFlow, JSoup, STJS, TeaVM, Bck2Brwsr, GWT, Apache Wicket, JSP, JSF, RIFE, Seam, ...

However, you'll need to really understand how HTML, JavaScript and CSS work to use those APIs.

Julien Gouesse | Personal blog | Website | Jogamp
Offline DarkCart

JGO Kernel


Medals: 121
Projects: 9
Exp: 50 years


It's all in the mind, y'know.


« Reply #9 - Posted 2016-08-17 11:47:18 »

Unlike a lot of people, I've been learning, I like to actually code stuff ._.

What does that even mean. Are you saying we're not learning by using what we use? Are you saying that we don't like to code things? If that's what you're getting at, then you've not looked up from your keyboard to see the projects on this forum. If we didn't like to program things, why would Rayvoution make Retro-Pixel Castles? Why would Markus_Persson make Minecraft? Even though both ended up being successes and made money for the creators, it had to be a labor of love on their part before any money started flowing in. Please, just shut up unless you have a valid point that won't lead to a flame war.

The darkest of carts.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Brynn

JGO Wizard


Medals: 100
Projects: 3
Exp: 1 month or less


JGO's Spiffy Duchess


« Reply #10 - Posted 2016-08-17 16:19:18 »

please kill me and this topic. put me out of my misery!

on a more serious note, hydroque is not one to talk.

Welcome to a new kind of tension
All across the alienation
Where everything isn't meant to be okay
Offline Hydroque

JGO Coder


Medals: 25
Exp: 5 years


I'm always inspiring a good time.


« Reply #11 - Posted 2016-08-21 03:03:51 »

I was going to post a helpful reply until I noticed who the OP is. Quit your whining and learn the damn markup syntax, millions of people make do with it. If you don't like it then create something better to replace it. I challenge you to do it.
Please don't be like that. You know damn well why create something better to replace it. I challenge you to do it. wouldn't be a good thing to bring up here.

Quote
But that's what template libraries are for. Problem solved.
Don't you think template libraries, etc are a bit overkill for the purpose?

Quote
What does that even mean.
It means everyone who codes that I have met want things done in the fastest means possible, keeping a good framerate. They don't care about the backend of libraries as long as it does what they want. Reinventing the wheel isn't necessarily what I mean, but there is a ton to learn anyways! People who work for companies, sure use this route, but I also want to note that there is a large history of crappy software and games whose code is cobbled together with small libraries. Yes, please, make a library for AVI video playback and stuff. No, don't make a library to easily handle file loading. Flame war?


You think I haven't been monitoring the chat? http://pastebin.java-gaming.org/c47d35366491fHere is a compilation <3
Offline wessles

JGO Kernel


Medals: 326
Projects: 4


All coding knowledge will be useless at peak oil.


« Reply #12 - Posted 2016-08-21 03:39:20 »

Quote
Don't you think template libraries, etc are a bit overkill for the purpose?

I completely agree. Let's turn a 25 year old standard on its head so we can develop our own HTML, but with inheritance. This way we won't need to use templates anymore. /s

If you stop to reinvent every wheel, you'll never make a car.

RFLEX.
Offline ags1

JGO Kernel


Medals: 356
Projects: 7


Make code not war!


« Reply #13 - Posted 2016-08-21 12:50:47 »

Hydroque, you can like totally do this for real. Make up whatever language you want.... then compile it Javascript, CSS and HTML.

Offline Ecumene

JGO Kernel


Medals: 192
Projects: 4
Exp: 8 years


I did not hit her! I did not!


« Reply #14 - Posted 2016-08-21 12:59:50 »

mfw



edit: after reading the thread, this is the first time I actually lol'd in a while

Offline Opiop
« Reply #15 - Posted 2016-08-21 13:35:40 »

Hydroque, why should I not be like that? Why should I not say that here? Be the change you want to see, recreate the web's standard markup and styling languages if you don't like them.

Templates are not overkill, they are a smart way to offload a lot of the crap you shouldn't have to deal with every time you want to go make a website. If you've ever spent more than 5 minutes as a web developer you would know that.

But by all means, you know more than the industry leaders right? What with their silly template engines and "libraries". Oh no, they have so much to learn so they should just remove all of it and rewrite their websites in pure HTML/CSS/JS. Brilliant solution.
Offline gouessej
« Reply #16 - Posted 2016-08-30 22:08:28 »

Be the change you want to see
Excellent citation of the Mahatma Gandhi:
https://www.goodreads.com/quotes/24499-be-the-change-that-you-wish-to-see-in-the

Julien Gouesse | Personal blog | Website | Jogamp
Offline lcass
« Reply #17 - Posted 2016-08-30 23:36:25 »

"I'm gonna make my own HTML , with black jack ... and hookers!" - Hydroque 2016
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 
Archive (407 views)
2017-04-27 17:45:51

buddyBro (588 views)
2017-04-05 03:38:00

CopyableCougar4 (1046 views)
2017-03-24 15:39:42

theagentd (1078 views)
2017-03-24 15:32:08

Rule (1052 views)
2017-03-19 12:43:22

Rule (1035 views)
2017-03-19 12:42:17

Rule (1026 views)
2017-03-19 12:36:21

theagentd (1166 views)
2017-03-16 05:07:07

theagentd (1122 views)
2017-03-15 22:37:06

theagentd (835 views)
2017-03-15 22:32:18
List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05

SF/X Libraries
by SkyAphid
2017-03-02 06:38:56

SF/X Libraries
by SkyAphid
2017-03-02 06:38:32

SF/X Libraries
by SkyAphid
2017-03-02 06:38:05

SF/X Libraries
by SkyAphid
2017-03-02 06:37:51
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!