News for hackers. Stuff that matters.
Re:Ask HN: Why Haven't GUI Front End Editors Caught On? by lj3 on Friday February 10, 2017 @12:18PM (#13617021)
There's a huge separation between who designs the frontend and who implements the frontend. To date, none of the frontend editors are good enough to completely replace the need for a programmer to wire up actions. Even back in the Flash days, you needed an ActionScript programmer to make your webapp do anything meaningful.

Since you need a programmer anyway, you might as well use a freeform design tool (Photoshop) to let the designer design whatever the hell he wants without the constraints that a more specialized app might impose. Then, let the programmer take that design and create whatever infrastructure he thinks is necessary without also constraining him to whatever a specialized app might impose.

I've been doing both design and programming a bit lately and I absolutely love apps like Subform, Webflow and Apple's interface builder. But, once I get past the fast iteration mockup phase, the structure of the app or webapp I'm making changes enough that the tools become unwieldy.

What I would really like are more robust layout APIs for both the browser and native apps. In Subform, you can define relative widths and positions both to other components and to the window itself. It's great for taking some of the tediousness out of design, but from a programming perspective, centering an object horizontally and vertically consistently is still a surprisingly difficult endeavor.

Re:Ask HN: Why Haven't GUI Front End Editors Caught On? by mxuribe on Friday February 10, 2017 @01:08PM (#13617482)
"...centering an object horizontally and vertically consistently is still a surprisingly difficult endeavor..." This is so true - even today. Oh wait, someone might state, "but there are frameworks you can simply integrate and they handle that kind of stuff for you, or at least make it easier"...To which I reply, do i really have to include ~500K - 1MB of some framework for this!?! Just silly that centering is an annoying task nowadays.
Re:Ask HN: Why Haven't GUI Front End Editors Caught On? by namuol on Friday February 10, 2017 @02:43PM (#13618245)
> To which I reply, do i really have to include ~500K - 1MB of some framework for this!?!

What framework?

    .center-the-stuff {
      display: flex;
      align-items: center;
      justify-content: center;
    }
Re:Ask HN: Why Haven't GUI Front End Editors Caught On? by fiveseven_ on Friday February 10, 2017 @03:18PM (#13618515)
here's a non-flexbox solution, but the parent element has to have a set height:

  .parent {
    position: relative;
  }

  .child {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }
Re:Ask HN: Why Haven't GUI Front End Editors Caught On? by alkonaut on Friday February 10, 2017 @05:29PM (#13619491)
It's like a magic spell that makes very little sense and is impossible to guess.

If I fire up a reasonable layout system (Xaml for example) which is completely foreign, it's trivial to do there.

I can't understand why html/CSS makes it so hard.

Re:Ask HN: Why Haven't GUI Front End Editors Caught On? by lj3 on Friday February 10, 2017 @06:02PM (#13619694)
Because html/css was never intended to be used for layout. It's primarily a content styling system for static documents.
Re:Ask HN: Why Haven't GUI Front End Editors Caught On? by alkonaut on Friday February 10, 2017 @06:23PM (#13619813)
Html/CSS have been revised a few times since then, so you'd think that the design should gravitate towards making the common things easy.
Re:Ask HN: Why Haven't GUI Front End Editors Caught On? by stevage on Saturday February 11, 2017 @12:07AM (#13621128)
That was a true statement in maybe 2005?
Re:Ask HN: Why Haven't GUI Front End Editors Caught On? by Animats on Friday February 10, 2017 @01:31PM (#13617682)
That was so easy with tables.
Re:Ask HN: Why Haven't GUI Front End Editors Caught On? by whostolemyhat on Monday February 13, 2017 @07:34AM (#13634787)
At the cost of poor performance on the client [1], so you're just pushing any time saved in development onto your user.

The only way around the poor performance of table layouts is to use table-layout: fixed, which then means you lose all responsive layout so you'd need to create a new version for every screen size you wanted to support (and implicitly, not be able to support every size of mobile screen since percentages don't play well with fixed layout. In this case, you haven't saved any time and in fact have created more work for yourself along with a worse version of your site since fewer people will be able to view it properly.

[1] http://www.stubbornella.org/content/2009/03/27/reflows-repai...

Re:Ask HN: Why Haven't GUI Front End Editors Caught On? by nip on Friday February 10, 2017 @02:38PM (#13618203)
If you can afford not to support IE9 [1], you don't need a 500K - 1MB framework to center vertically and horizontally by using flexbox (align-items: center; justify-content: center) on the parent container.

[1] http://caniuse.com/#feat=flexbox

Re:Ask HN: Why Haven't GUI Front End Editors Caught On? by amenod on Friday February 10, 2017 @03:06PM (#13618432)
Fortunately this is not much of an issue because IE is on its well deserved way of dinosaurs and Dodo the bird (my sympathies to those who can't get rid of it because of some dated corporate standards) and Edge doesn't seem to have much impact either. It would fill me with endless joy years back had I known its fate and the success MS will have in next computing platform (mobile). Good riddance!
Re:Ask HN: Why Haven't GUI Front End Editors Caught On? by 91bananas on Friday February 10, 2017 @03:43PM (#13618724)
Or you can support it but not give them vertically centered content. Screw em. If they want it to be 5 years ago, let them be 5 years ago. FIVE!
Re:Ask HN: Why Haven't GUI Front End Editors Caught On? by salmo on Friday February 10, 2017 @10:24PM (#13620779)
I like to call this degrading gracefully :)
Re:Ask HN: Why Haven't GUI Front End Editors Caught On? by andrei_says_ on Friday February 10, 2017 @03:02PM (#13618403)
I am looking forward to the day when I don't have to support ie9
Re:Ask HN: Why Haven't GUI Front End Editors Caught On? by TylerE on Friday February 10, 2017 @02:43PM (#13618244)
Or you can use a table and get on with your life.
Re:Ask HN: Why Haven't GUI Front End Editors Caught On? by leepowers on Friday February 10, 2017 @03:18PM (#13618513)
Or `display: table` and `display: table-cell` so you can use a `<div>` instead of the dreaded `<table>` tag.
Re:Ask HN: Why Haven't GUI Front End Editors Caught On? by news_to_me on Friday February 10, 2017 @01:11PM (#13617501)
> What I would really like are more robust layout APIs for both the browser and native apps.

This is what I love about CSS flexbox and grid. Flexbox completely changed how I approach layouts, and I'm excited for grid to hit the big time as well.

The only thing I wish flexbox could do is allow custom spacing functions, so I could write my own alternative to "justify-content: space-around".

Re:Ask HN: Why Haven't GUI Front End Editors Caught On? by jasondc on Friday February 10, 2017 @01:20PM (#13617569)
Here is the best visual approach ive seen to designing flexbox layouts: http://flexboxgame.com
Re:Ask HN: Why Haven't GUI Front End Editors Caught On? by briantmaurer on Friday February 10, 2017 @05:27PM (#13619477)
This is great. Until now, I have been using the "flex box froggy" game for reference. It has been faster for me to recall flex-box CSs rules by scrolling through levels in that game than reading any "real" documentation.

The link you shared above is a big upgrade.

Re:Ask HN: Why Haven't GUI Front End Editors Caught On? by nojvek on Saturday February 11, 2017 @01:04AM (#13621301)
I really like what safari has done with its devtools for the style editor.

Right-click inspect element selects the element you want to modify. Then change CSS properties in a GUI editor. Only problem is persistence.

I love designing and tweaking with devtools iteratively.

A lot of things are done in editors because it gives you a lot of control of logic. Designing assets in visual language like flash makes a lot of sense.

Unity has the same idea. Create your assets visually and assign behaviors to it via code. Their GUI/code fusion is pretty cool.

Writing a public var in a class exposes it in GUI and makes it bindable to other things via click and drag.

Re:Ask HN: Why Haven't GUI Front End Editors Caught On? by fiveseven_ on Friday February 10, 2017 @09:03PM (#13620512)
Flexbox Game doesn't support Firefox 53 yet, but I can vouch for Flexbox Froggy as well as Flexbox Defense http://www.flexboxdefense.com/
Re:Ask HN: Why Haven't GUI Front End Editors Caught On? by namuol on Friday February 10, 2017 @02:45PM (#13618267)
> custom spacing functions

Keep an eye on "Houdini" -- a new browser API draft that exposes the internals of CSS's layout system (and much more): https://www.youtube.com/watch?v=sE3ttkP15f8

Re:Ask HN: Why Haven't GUI Front End Editors Caught On? by Jach on Friday February 10, 2017 @05:47PM (#13619591)
I wish more tools let me define constraints. Flexbox helps to brute force the layout you want, but it's still pretty annoying. Something like http://gridstylesheets.org/ is a good example of what I want to use more of the time.
Re:Ask HN: Why Haven't GUI Front End Editors Caught On? by seanp2k2 on Friday February 10, 2017 @03:55PM (#13618808)
Sketch is pretty good these days and easier for developers to take the output of vs. Photoshop: https://www.sketchapp.com/