5 ms·
The "framework" is Google Polymer. The only thing I use JQuery for is trivial stuff like selecting elements, cookie support, and DOM manipulations, which is exa
by ClayFerguson 10y ago
The "framework" is Google Polymer. The only thing I use JQuery for is trivial stuff like selecting elements, cookie support, and DOM manipulations, which is exactly what the rest of the industry uses JQuery for, but i bet you didn't know any of that.
- Kiro 10y ago> Show me one issue in the code and I will thank you, but you won't find much fault there. You need to get off your high horse. Not even Jon Skeet thinks he creates perfect code. Your project is nowhere near "great example of modern architecture in a web app". You depend on mysterious global variables everywhere, mix jQuery with HTML tags hard coded in strings (with classes and everything) and have no unit or E2E tests. I applaud your overconfidence though. Most people are ashame of their code, even when it's ten times better than this. Serious tip: invest time in learning React+Redux/MobX or Vue. I promise you it will make your life much better once you realize your shortcomings.
- ClayFerguson 10y agoThose are not global variables. They're TypeScript namespaces. Everything is in a namespace. I'm using namespaces to accomplish the "singleton pattern" in TypeScript, and to avoid globals. Most modern Java-Spring Server-side code usually uses lots of singleton services, and i'm doing the same sort of pattern, in TypeScript. Regarding the generating of the presentation code being done in pure JS/TS rather than a bunch of template files rendered on the server is actually another innovation in disquise. This app is so dynamic that even if it were template-based the templates themselves would be 90% logic, which is why just generating presentation code on the client is ideal. This IS mainly a client-side app, that consumes a server-side JSON API, rather than getting any actual HTML from the server. Yes it's inverted from the way the rest most people are still doing it, but what I'm doing is the future. Learn a bit about microservices and RESTfull stuff and you might begin to see the light, about how a browser can consume an API that sends back JSON DATA rather than rendered HTML. It's the future. I'm doing it right. You just don't get it yet. And if you're irked by my confidence, frankly that makes me happy.
- pier25 10y agoI haven't seen your code, but using lots of Singletons is usually a code smell. > Learn a bit about microservices and RESTfull stuff and you might begin to see the light, about how a browser can consume an API that sends back JSON DATA rather than rendered HTML. It's the future. RESTful APIs are great but you are 10 years late to the party. Using RESTful APIs is exactly the same thing web services were back 15 years ago with XML. https://apievangelist.com/2012/12/20/history-of-apis/ https://apievangelist.com/2012/12/20/history-of-apis/
- ClayFerguson 10y agoI actually don't like RESTful stuff. I used the term to point out that the conversation between client and server is pure JSON which is the technique REST popularized. meta64 has a 'functional' interface to the server, and yes it's state-of-the-art. JSON up and JSON down.
- Kiro 10y agoI'm not talking about namespaces. I mean stuff like "srch" in https://github.com/Clay-Ferguson/meta64/blob/master/src/main/resources/public/ts/panel/timelineResultsPanel.ts https://github.com/Clay-Ferguson/meta64/blob/master/src/main... Also, singletons are simply bad practice so that's just another sign that your code is far from "state of the art". > Yes it's inverted from the way the rest most people are still doing it, but what I'm doing is the future. Of course you consume JSON through a REST API and let the client handle HTML generation when building an SPA. "The future" you're speaking of has been industry standard for 10 years. Nothing radical or innovative about it. How do you think React, Vue or Angular work?
- ClayFerguson 10y agosrch is namespace: I think it was about line 8 in this file: https://github.com/Clay-Ferguson/meta64/blob/master/src/main/resources/public/ts/search.ts https://github.com/Clay-Ferguson/meta64/blob/master/src/main... That's funny that you don't like singletons. Not sure how you got brainwashed about them, but they are good and VERY widely used today by all major codebases. Singleton is literally the "default scope" for all Spring Beans, so you are so completely clueless about that.