TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Presenting the Most Over-Engineered Blog Ever

378 pointsby jlongsterover 10 years ago

27 comments

kderbeover 10 years ago
The most over-engineered blog that I know of is Casey Muratori&#x27;s at <a href="http://mollyrocket.com/casey/" rel="nofollow">http:&#x2F;&#x2F;mollyrocket.com&#x2F;casey&#x2F;</a> . &quot;View source&quot; and you&#x27;ll see a long list of auto-generated variables and function calls, unlike anything else you&#x27;ve probably seen for any website.<p>Casey attempts to explain what he did in a podcast[1]. Apparently, he was frustrated enough with CSS&#x27;s margins that he built a layout engine in C that calculates offsets for every piece of text in the page, then generates hundreds of lines of Javascript that apply fixed positioning to arrange the text.<p>[1] transcript: <a href="http://mollyrocket.com/jacs/jacs_0004_0010.html" rel="nofollow">http:&#x2F;&#x2F;mollyrocket.com&#x2F;jacs&#x2F;jacs_0004_0010.html</a>
评论 #8896256 未加载
评论 #8895722 未加载
评论 #8895758 未加载
评论 #8898486 未加载
评论 #8895880 未加载
评论 #8895680 未加载
评论 #8897005 未加载
tekacsover 10 years ago
It might be worth turning your GitHub links in the article into permalinks (hit &#x27;y&#x27; in the GH interface once you&#x27;ve targeted the file and line) so they don&#x27;t fall out of date.<p>Nice work!
评论 #8895335 未加载
DomKMover 10 years ago
Great stuff!<p>You&#x27;re correct about it being sort of awkward at first when you are figuring out how to structure an isomorphic applications. It gets even weirder when you only use JavaScript as a compilation target.<p>I created an example isomorphic Clojure and ClojureScript application (<a href="https://github.com/domkm/omelette" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;domkm&#x2F;omelette</a>) and wrote about how it works (<a href="http://domkm.com/posts/2014-06-15-isomorphic-clojure-1/" rel="nofollow">http:&#x2F;&#x2F;domkm.com&#x2F;posts&#x2F;2014-06-15-isomorphic-clojure-1&#x2F;</a>). It was an interesting experience. I wouldn&#x27;t recommend it for production quite yet but I&#x27;m looking forward (and working toward) the day when we can easily deploy isomorphic applications that are not written in JavaScript.
评论 #8894959 未加载
bsimpsonover 10 years ago
I&#x27;m also experimenting with isomorphic React apps. I&#x27;ll be presenting some of my work at React Conf at the end of the month (so this isn&#x27;t yet as well documented as it should be), but here&#x27;s what I&#x27;m trying to handle async data with ReactRouter:<p>- Have the data your view depends on expressed as a named parameter in routes.jsx: <a href="https://github.com/appsforartists/ambidex-example--bike-index/blob/master/application/routes.jsx" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;appsforartists&#x2F;ambidex-example--bike-inde...</a><p>- Use those named parameters to resolve which stores need to be populated before rendering: <a href="https://github.com/appsforartists/ambidex-example--bike-index/blob/master/application/bike-index/reflux/actionsForRouterState.js" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;appsforartists&#x2F;ambidex-example--bike-inde...</a><p>- Don&#x27;t render the page on the server until those routes are populated: <a href="https://github.com/appsforartists/Ambidex/blob/master/src/callActionsForRouterState.js" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;appsforartists&#x2F;Ambidex&#x2F;blob&#x2F;master&#x2F;src&#x2F;ca...</a><p>In that example, the editBike view depends on bikeID. actionsForRouterState makes sure that the viewBike action is called to populate the CurrentBike store before any route that includes bikeID is rendered.
评论 #8896774 未加载
bevacquaover 10 years ago
More over-engineered than <a href="http://ponyfoo.com" rel="nofollow">http:&#x2F;&#x2F;ponyfoo.com</a>?<p><a href="https://github.com/ponyfoo/ponyfoo" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;ponyfoo&#x2F;ponyfoo</a> has over 2k commits
评论 #8897606 未加载
评论 #8895084 未加载
iso8859-1over 10 years ago
Would this make it possible to have the whole page in &lt;noscript&gt; tags to make it crawlable by all bots and browsable in Links, Lynx, Dillo, w3m and offByOne?
评论 #8895411 未加载
评论 #8895604 未加载
评论 #8895255 未加载
Xophmeisterover 10 years ago
I&#x27;ve been doing something similar using Backbone and Ezel[1] (I first started using Rendr[2], but couldn&#x27;t get into it): As the OP says, it can be a bit confusing to get your mind around. Particularly the routing; part of my intention was to use the &quot;isomorphic&quot; technique -- btw, as a mathematician, I <i>really</i> hate that this term is used...but I digress -- to create a SPA that falls back to a traditional multipage site if&#x2F;when JavaScript is disabled. It was a bit of a hurdle, but ultimately proved possible.<p>I might give React a closer look, having read this.<p>[1] <a href="http://ezeljs.com/" rel="nofollow">http:&#x2F;&#x2F;ezeljs.com&#x2F;</a><p>[2] <a href="https://github.com/rendrjs/rendr" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;rendrjs&#x2F;rendr</a>
gcantiover 10 years ago
I&#x27;m also experimenting with &quot;isomorphic&quot; apps. I wrote a router with an expressjs&#x2F;hapijs like API (middlewares included). The main point is handling the state <i>before</i> choosing the view. The concept is general enough to avoid being tied to React although React makes things easier. Once you have such a router, handling nested views (a la react-router) is a trivial particular case.<p>Here&#x27;s my lab <a href="https://github.com/gcanti/tom" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;gcanti&#x2F;tom</a>
评论 #8895582 未加载
mattdeslover 10 years ago
Nice writeup. I can definitely see &quot;isomorphic&quot; or client&#x2F;server frameworks (React and Ember especially) being the go-to choice for new sites.<p>I guess an exception would be richer &quot;experiential&quot; type of apps and toys, where some DOM might be replaced with Canvas&#x2F;WebGL, and transitions&#x2F;animations&#x2F;etc take precedence over SEO and initial load time. I haven&#x27;t seen much innovation in terms of MVCs or frameworks that target these types of sites.
评论 #8895554 未加载
jxm262over 10 years ago
Great job! Also love the write up you gave and that you shared the code. I tried doing something similar a while back but never got around to finishing it, so I&#x27;ll definitely dig through this source for some inspiration. I&#x27;m very curious how you&#x27;ll develop the integration between webpack and gulp (or whatever you plan on using) as I tried doing something similar with Grunt but eventually gave up. Having only one build step would be awesome.
评论 #8895408 未加载
feedjoelpieover 10 years ago
Yes, yes, yes. At my company we&#x27;ve been switching everything over to React for both client&#x2F;server rendering using our own ExecJS rendering engine for Ruby on Rails. It certainly adds a bunch of complexity to the stack, but every improvement we make provides new benefits in terms of the ease with which we can keep the API stack we like while cranking out rich UI while worrying much less about the client&#x2F;server distinction.<p>Needless to say, I am a React fan.<p>That said, here are some things you will run into as you build more complex applications with this architecture. Some are related to shared browser&#x2F;server JavaScript and some are React in general:<p>* You will find that some JavaScript libraries you want to use should not be loaded into the server context.<p>* On occasion, you will need to add server-vs-browser conditionals. And creating components to deal with browser-focused JS libraries (think Google Maps) will require some liberal and sometimes awkward use of React component lifecycle methods.<p>* Until there&#x27;s a nice, agreed-upon open-source layering library for React out there, or you make your own, things like click-based (not hover-based, which can work with just CSS) dropdowns and non-modal dialogs are weirder to get to dismiss (when clicking outside of them) than they should be. Just because of the way React events happen and are bound.<p>* Also because of the way events are bound, it&#x27;s awkward to write nice reusable form components. Without some trickery, you can only bind events from the component you&#x27;re writing to its descendents. You can&#x27;t bind events from one descendent to another. You end up writing a new component for each form every time, which isn&#x27;t necessarily terrible until you want to make a fancy form builder like Rails provides in ERB. I&#x27;ve tried every which way around this, and I&#x27;ve had some success, but the solution always feels wrong and ugly no matter how I do it.<p>* This is really more of a good thing, but it&#x27;s so enabling that you&#x27;ll never really be done adding convenience features. There are just so many &quot;Wouldn&#x27;t it be nice if ____ just worked?&quot; scenarios that get you thinking about the next reusable tool you want. I spend a LOT of time trying to create the &quot;perfect&quot; browser-side data store abstraction and the &quot;perfect&quot; lazy loader&#x2F;renderer component for not-yet-fetched models.<p>The tradeoffs thus far have been worth it, but we haven&#x27;t yet found or built the holy grail. So many things are so much easier than the old ways, but sometimes they&#x27;re harder.
评论 #8912202 未加载
crm416over 10 years ago
This is awesome. I&#x27;ve played around with React&#x27;s server-side rendering [1] and was really impressed once I&#x27;d hooked it all up. To see React hook up the event handlers and render nothing at all was really satisfying.<p>I haven&#x27;t had a chance to use react-router, but it&#x27;s great to hear that they&#x27;ve put in the work to make server-side rendering a reality. I only hear positive things. Kudos.<p>[1] <a href="http://www.crmarsh.com/react-ssr/" rel="nofollow">http:&#x2F;&#x2F;www.crmarsh.com&#x2F;react-ssr&#x2F;</a>
cstratover 10 years ago
Very cool, I haven&#x27;t ready looked into react. I have just started with meteor and it&#x27;s been fun and a big learning experience. My previous background was all with php and traditional client&#x2F;server nteractions. It&#x27;s quite hard overcoming that way of thinking. Not really sure if it&#x27;s relevant but my first meteor app was completely built with calla &amp; methods rather than realising the client&#x2F;server boundary isn&#x27;t what it used to be...
mjacksonover 10 years ago
Awesome stuff James :) I&#x27;ve been having a lot of those weird client vs. server realizations myself. Still getting used to thinking about stuff that renders in both places.<p>I&#x27;m particularly interested in hearing about your ansible + docker setup. I&#x27;ve been using both a lot lately, and trying to figure out the best way to use them together.
评论 #8895631 未加载
JDiculousover 10 years ago
Cool stuff. Was planning to do something similar but never got around to implementing the client-side rendering bit (<a href="http://www.jbernier.com" rel="nofollow">http:&#x2F;&#x2F;www.jbernier.com</a>). The codebase I work on at work is also isomorphic JS with React. Sharing client&#x2F;server code is definitely the way to go.
passfreeover 10 years ago
Yes it is over-engineered. Heck, even WordPress is engineered. Blogs are essentially static pages with the comments as a moving part (i.e. dynamic). Most blogs can happily leave on a static web folder if bound to something like Disqus or whatever you decide to use.
评论 #8895733 未加载
评论 #8898121 未加载
bagosmover 10 years ago
This is very nice! A question though: it does need a knowledge of client state right? How big is that data per session? Is it viable to keep the data on client and send with each request via a cookie so that you don&#x27;t need more server resources?
评论 #8894964 未加载
backspacesover 10 years ago
Wow, JavaScript is approaching science fiction levels of sophistication! Love the idea of moving functionality from client to server or reverse. Knew about Docker but not Ansible, thanks for that. Now we need some Sweet Macros to help too.
Toucheover 10 years ago
&gt; Unfortunately, full client-side apps (or &quot;single page apps&quot;) suffer from slow startup time and lack of discoverability from search engines.<p>This is simply not true. Google announced that they can crawl single page apps just fine nearly a year ago (<a href="http://googlewebmastercentral.blogspot.com/2014/05/understanding-web-pages-better.html" rel="nofollow">http:&#x2F;&#x2F;googlewebmastercentral.blogspot.com&#x2F;2014&#x2F;05&#x2F;understan...</a>) and although Bing hasn&#x27;t announced anything they are likely working on the same thing if it&#x27;s not already rolled out.<p>Google does this already; it works. Rendering on the server has little actual value in 2015 but it some how became a critical feature all of the JS frameworks are fighting for without proper explanation of its benefit.<p>EDIT: It&#x27;s fine if you disagree and I don&#x27;t even mind being downvoted, but please do explain.
评论 #8895800 未加载
评论 #8896076 未加载
评论 #8896791 未加载
Xeoncrossover 10 years ago
In addition to server-rendered blogs and this isomorphic blog, I wrote a client-side blog called &quot;Jr&quot; (<a href="https://github.com/Xeoncross/jr" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;Xeoncross&#x2F;jr</a>)
slashnullover 10 years ago
My god so many incredible links of crazy blogs here...<p>I took a certain pleasure in the opposite recently, by writing on a few simple .html files on an Apache server with headers in &lt;h\d&gt; and content in either &lt;p&gt; or &lt;ul&gt;
arenaninjaover 10 years ago
I&#x27;ve been doing this for a private project, and a LOT of my time is sunk into thinking how my app should be structured. It&#x27;s an absolute nightmare, but also great fun!
esMazerover 10 years ago
this is a really cool idea, however I can see how some people would try to abuse the app playing pranks on other people and the like.. I don&#x27;t have an iphone so I can&#x27;t check if there are some ways that the users are verified (basically a test to see if they are really blind) seems extreme but this might be better to help grow a more &#x27;healthy&#x27; community
rbanffyover 10 years ago
And I was thinking using Plone for my blog was overkill...<p>Wel... &quot;If it&#x27;s worth doing, it&#x27;s worth overdoing&quot;.
dcreover 10 years ago
Great post. Why didn&#x27;t you use JSX?
pandeiroover 10 years ago
Add some immutable data and sweet.js macros and you&#x27;ve nearly got ClojureScript!
stopachkaover 10 years ago
haha, this is awesome!