Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "templating"
-
Me: So we've used Bootstrap for front-end and Django for ...
Teacher: Bootstrap is not a front-end framework.
Me: Uh..Okay. It's a CSS framework ? My bad.
Teacher: No, Python is for front-end.
Me: You mean templating ? Yeah! We've used Jinja templates.
Teacher: No. Use Python for front-end.10 -
Working with different nationalities is interesting, and sometimes kind of bewildering. And tiring.
I've been working with an Indian dev for a little while, and while she's a decent dev, interactions with her sometimes leave me a little puzzled. She glazes over serious topics, totally over-sensationalizes unimportant oddities, has yet to say the word "no," and she refers to the senior devs as (quote) "the legends." Also, when asked a question by her boss, like "Are you familiar with this?" Instead of a simple yes/no answer, she shows off a little. Fair, I do this sometimes too, but it's a regular thing with her. Also, like most Indians I've known and/or worked with, she has a very strict class-and-caste view of the world. It honestly makes me a little uncomfortable with how she views people, like certain people belong in certain boxes, how some boxes (and therefore their contents) are inherently better than others, and how it's difficult or simply impossible to move between boxes. My obviously westerner view of things is that you can pick where you want to be and what you want to do, and all it takes to get there is acquiring the proper skills and putting in the required effort. I see no boxes at all, just a sprawling web of trades/specialities. And those legends she talks about? They're good devs with more knowledge than me, but only one, maybe two of them are better devs. I see them as coworkers and leads, not legends. Legends would be the likes of Ada Lovelace, Dennis Ritchie, Yukihuro Matsumoto, and Satoshi Nakamoto. (Among others, obv.). To call a lead dev a legend is just strange to me, unless they're actually deserving, but we don't work with anyone like Wozniak or Carmack.
Since I'm apparently ranting about her a little, let me continue. She's also extremely difficult to understand. Not because of her words or her accent, but I can't ever figure out what she's trying to get across. The words fit together and make valid sentences, but the sentences don't often make sense with one another, and all put together... I'm just totally lost. To be a math nerd, like the two conversations are skew lines: very similar, but can never intersect. What's more, if I say I don't understand and ask for clarification, she refuses and says she doesn't want to confuse me further, and to just do what I think is best. It's incredibly frustrating.
Specifically, we're trying to split up functionality on a ticket -- she's part of a different dev team (accounting), and really should own the accounting portion since she will be responsible for it, but there's no clear boundary in the codebase. Trying to discuss this has been... difficult.
Anyway.
Sometimes other cultures' world views are just puzzling, or even kind of alien. This Irish/Chinese guy stayed at my parents' house for a week. He had red hair, and his facial features were about 3/4 Chinese. He looked strange and really interesting. I can't really explain it, but interacting with him felt like talking to basically any other guy I've known, except sometimes his mannerisms and behavior were just shockingly strange and unexpected, and he occasionally made so little sense to me that I was really taken aback.
This Chinese manager I had valued appearances and percieved honors more than anything else. He cared about punctuality and attire more than productivity. Instead of giving raises for good work or promotions, he would give fancy new titles and maybe allow you to move your desk somewhere with a better view of your coworkers. Not somewhere nicer; somewhere more prominent. How he made connections between concepts was also very strange, like the Chinese/Irish guy earlier. The site templating system was a "bridge?" Idk? He also talked luck with his investors (who were also Chinese), and they would often take the investment money to the casino to see if luck was in the company's favor. Not even kidding.
Also! the Iranian people I've known. They've shown very little emotion, except occasionally anger. If I tried to appease them, they would spurn and insult me, but if I met their anger, they would immediately return to being calm, and always seemed to respect me more afterward. Again, it's a little puzzling. By contrast, meeting an American's anger often makes them dislike you, and exceeding it tends to begin a rivalry.
It's neat seeing how people of different nationalities have different perspectives and world views and think so very differently. but it can also be a little tiring always having to translate and to switch behavior styles, sometimes even between sentences.
It's also frustrating when we simply cannot communicate despite having a language in common.random difficult communication too tired for anger or frustration nationalities tiring diversity root observes people23 -
Getting annoyed by the framework made by school which we had to use. We werent allowed to use Laravel or other frameworks.
What did I do with a classmate, we expanded on the schools framework. Added a templating engine, improved routing, made a query builder and a few other things before startimg the real project. 4 weeks of building the framework to build the application in a day.
Where others were still using the schools framework were strugglimg and not able to make it.2 -
Short version:
Dear devRantdairy,
today I was stupid.
The End.
Full version:
I am working on some messaging system, trying to use less as possible overhead sending data. Therefore there of course are asynchronous calls and some templating. But that's just the setting of the rant: I designed an architecture to save conversations in a database. Working with transactions in pdo I wrote a query wich in my eyes should have worked well. But the result just didn't appear in the table. So I started debugging data. Recreated the table. Rewrote the query. Went to bed. Woke up. Further tryed to make this work. And in the end I realized I just forgot to commit the transaction.
How dumb can you be? There's way too much time gone for that mistake. Is there a hole? I want do dig myself.9 -
Gotta love well meaning juniors with completely misplaced intentions.
Nathan: "Hey, do you want a quick 5 minute demo of the code we've changed to move to library version x?"
Almond: "Sure (I wasn't that fussed about moving to library x, but he seemed determined and there's some nice to haves with bumping the version, so we approved it.)"
Nathan: "Cool, so we have this built here, and..."
Almond: "...wait, that's not our CI system!"
Nathan: "Yeah, so I moved to a new CI system too because we couldn't get that working in the old one"
Almond: "...right, we'll need to discuss that, because..."
Nathan: "Sure, we also moved the templating engine as well as there were more examples using this one with library x"
Almond: "...yeah, so I don't think we're looking to switch the templating engine because..."
Nathan: "...and you guys also need to change a bunch of your code as it's all broken since we put the new version in, most of the tests fail..."
Great... so we've got a branch that breaks a bunch of code, switches the templating engine to one we don't want to use, and switches the CI to the one the company is trying to actively migrate away from...
Almond: "We're going to need longer than 5 minutes. I'll put something in the calendar."
🤦♂️😬😠8 -
Dear devRant,
I know you will hate me if I do this, so please set me straight,
I have urges...
Urges to create my own, fucked up flavor of markdown....
and worse yet.....
to make it a JavaScript templating engine.................
and publish it to NPM......................
I know you can do it. You can stop me before I commit this atrocity.12 -
1. Slack. Pretty good chat app for dev companies, I use it to prevent people standing next to my desk 40 times a day.
2. Unit testing tools, especially when fully automated using a git master branch hook, something like codeship/jenkins, and a deployment service.
3. Jetbrains IDEs. I love Vim, but Jetbrains makes theming, autocompleting & code style checks with mixed templating languages a breeze.
4. Urxvt terminal. It's a bit of work at the start, but so extremely fast and customizable.
5. Cinnamon or i3. Not really dev tools, but both make it easy to organize many windows.
6. A smart production bug logger. I tend to use Bugsnag, Rollbar or Sentry.
7. A good coffee machine. Preferably some high pressure espresso maker which costs more than the CEO's car, using organic fairtrade hipster beans with a picture of a laughing south american farmer. And don't you dare fuck it up with sugar.
8. Some high quality bars of chocolate. Not to consume yourself, but to offer to coworkers while they wait for you to fix a broken deploy. The importance of office politics is not to be underestimated.1 -
Modern web frontend is giving me a huge headache...
Gazillion frameworks, css preprocessors, transpilers, task runners, webpack, state management, templating, Rxjs, vector graphics,async,promises, es6,es7,babel,uglifying,minifying,beautifying,modules,dependecy injection....
All this for programming apps that happen to run inside browsers on a protocol which was designed to display simple text pages...
This is insanity. It cannot go on like this for long. I pray for webasm and elm to rescue me from this chaos.
I work now as a fullstack dev as my first job but my next job is definitely going to be backend/native stuff for desktop or mobile. It seems those areas are much less crazy.10 -
I got tired of relearning JavaScript frameworks and instead tried to escape their clutches.
Most of my developer life I've spent relearning how to do the same thing in a different framework.
And every three or four years its the same story, figure out templating, figure out building, complain on github bugs etc.
I am trying to reduce framework fatigue by allowing you to think "can I make my application with just vanilla JavaScript". The advantage of vanilla JavaScript is it write once - do not need to rewrite.
Do YOU think I will abandon ship and end up having to use a framework again?19 -
okay, i'm still a newbie to (unmanaged) C++, but looking at a colleague's code, what the hell is all this cryptic shit 😵 all this unreadable templating stuff + typedefs, 8 different copy operators in one class, i'm getting headaches just looking at it3
-
Why the fuck are all templating engines called after synonyms of the same thing?
Laravel has Blade
ASPNET has Razor
Node has Edge10 -
Me, starting this project: "im gonna use a templating engine so i can effectively generate files"
Me, now: "this could have been done by a string replace" -
Today I officially ditched PHP for Golang. I left my job where we were doing modern software with templating language for new and shiny Golang job. Was telling stories about how cool Golang is, and how PHP sucks. Felt good man... Wanted to do it for so long...18
-
So I was writing docs for my project the hard way. Manually. Every time I added something new, I had to find the right place for it to be alphabetically in the reference. And god forbid I want to have the same information in two pages: I would need to copy/ paste and pray that I not forget to update the information EVERYWHERE.
I didn't feel like installing and learning some new markdown generating bullshit so I just made my own system. It's very simple and intuitive and I love it.
I made sure it can cover two use case: reading partial documents from the disk, and rendering in-memory objects to markdown too (like rendering a collection of tuples into a table)
I didn't care much for templating, so there's no templating capability.2 -
I fucking love it!
After a full day of refactoring old shitty code into a glamorously sparkling epicness of bytes, the whole thing worked flawlessly and on speed.
Quite satisfactory. 😊
Templating in TWIG, especially using inheritance and includes, is so much more fun than doing it in raw PHP!
*cough*Fuck WordPress*cough"1 -
If you're going to fucking build a fucking templating system, you fucking better make sure it fucking follows proper structure -- Bootstrap, vanilla CSS, whatever -- so that when I follow conventions your fucking shit doesn't fucking shit all over the fucking place in fifty fucking different ways.1
-
Always love seeing massive companies fail in simple trivial things like these. Just tells me they don't have proper QA.5
-
This is not a troll q, im gebuinely interested.
What sets spa frameworks (say react) apart from a templating engine and some dom fuckery? To me it seems they are all just syntactic sugar on top of these two very basic things (plus routing), but admittedly im not a frontend dev so im asking more experienced people here.8 -
Dear PyCharm,
When you decide to change the default templating language from Django to Jinja2, please tell me.
You owe me for psychiatrist bills2 -
WTH...
While styling some frontend stuff with LESS, I experienced that on one page template the <header> was not displaying the given line-height eventhough the whole fscking code was 1:1 identical with the other template in which everything was fine. I checked EVERYTHING... caching, URL, source, classes, open / wrong tags, HEAD, ... I even did a diff compare. NO FSCKING DIFFERENCE!
After one hour of pulling out hair I suddenly saw that in the faulty template file 2 lines were missing:
<!DOCTYPE html>
<html lang="devRantLang">
WHOEVER DID THIS: YOU ARE FSCKING STUPID!!! (it was me...)7 -
So... Today I started using my first Python web framework, web2py. At a first glance I liked it, the templating system, the view/controller thing ecc. But there is one thing in frameworks that I really don't like: they make me feel dumb.
I mean, in just one line of code I can generate an entire form, but if I wanna customize it a little bit... I can't. Or better, it is very hard, also if there is a bug, I have to look for a problem in an entire system that I DID NOT wrote.
I don't like the idea that the frameworksl handles everything for you, like it is teasing me, I don't even know how it works, it just works, and man, I don't like it. There's some kind of hacker in me, I dont like a system that just works, I want to know how it works. But the sad thing is that I will have to learn web frameworks if I want to work in the IT, right? Please If you can help me or share your experience with web frameworks do so.3 -
Maybe two days ago I expressed interest in creating a dynamic HTML templating system.
Here's what I came up with. template.js only 34 lines. Which is great because JS is ugly and I want the least amount of it as possible.
The idea is you can create hiddent templates, modify them using traditional means (HTML/ CSS), then generate an infinite amount of them in JS.
Btw: Screenshot is two different images stitched together. There isn't JS and HTML in the same place.19 -
JavaScript templating libraries are such a joke.
Either they:
- Totally change the syntax of HTML (Which? would make them? Not a templating engine? But their own shitty markup language?)
- Are already deprecated (And the new version isn't done yet!)
- Both7 -
I ain't that picky, but the image I am including here makes me feel uncomfortable.
Is it horrible? Nah, shit like this happens all the time. I just feel weird about it due to my manager's constant pixel perfect implementation requirements.
I have been having a crazy week. And I am thankful that at one point during my period of Javadiction(the great Javadiction of 2015 as I called it because I did nothing but Java) I landed on the Velocity template lang.
I quite like templating engines. Always made me think that if I wanted to start with lang design I might start there. Anyways, Velocity is pretty cool and I quite like using it at work.
It makes everyone think that I am the Alpha coder since around these parts it ain't known at all. -
After creating my own PHP MVC framework with Twig as templating engine, everything is now so simple and so fast, I juat cant belive how much I understand now. The development is just so smooth, you know exactly what to do all the time... And for my simple project, it does not even hurt that much to use PHP (and its even strictly typed 7.2, so not that bad). I think that I am in love. ❤6
-
This is embarrassing, but the first days of learning about AngularJS I had to implement functionality about a new component of the WebApp I was building.
I did a good templating, I build the component along with its controller and services, I verified there wasn’t any memory leak and that everything was in an isolated scope. Yet nothing at all appeared on the app. It took me more than 30 minutes until I realized...
I didn’t put the source code on the index.html file 😅
For people who know more about compiled languages such as C or Java... that’s like not putting your source code file in the makefile. 😅
I felt literally like the dumbest person in the planet at that moment. 😀🔫1 -
I'm getting caught up on my personal project because I need to generate a lot of Dynamic HTML using JS and it's just a pain. I hate adding dependencies to a project, especially personal projects with no deadlines, so tomorrow I will be writing a vanilla templating system, and hopefully that will un-funk me.3
-
Jinja2 is so awful compared to simple and elegant erb, but you can't go over python whitespace limitations.
-
Why the fuck nobody talks about Multi-page apps?! We went from a Web where everything was Multi-page server-rendered, and now everything for Web developers is "Single-page apps".
What about websites who can't do that? Not everything can be a single-page app. Only my uncle's restaurant website, or something which is TRULY a full app. No half choices.
If your website is a multi-page app/portal which actually PRELOADS data, instead of doing 100 fetch to an API within a page that is full of loading bars, well, your life is a pain.
When you want a first contentful paint which isn't a white page, well, your life is a pain.
What are React, Vue, Ember, Angular (let's exclude Svelte and Marko) going to do about Multi-page apps and SSR?
React-router sucks to me. It's performance is weak and it's useful only when you have an SPA with multiple sections which can be treated as pages (e.g. A single SPA divided in tabs).
Server-side rendering is the worst pain ever made by humanity, in React (and prob Vue, I didn't try but I can bet). And even when made easier from libs like Svelte and Marko, I (personally) can't get it to be faster enough compared to a traditional website without a JS framework and with a templating engine.
Anyways, if there's anything that I learnt from React, is to stay away from Next.js. Perfect, beautiful, mess.
All JS frameworks just seem to bloat the code and make it worse and slower, even though they're REALLY helpful.
Why? Why everyone loves them if their downsides are so clear? Why 3 projects out of 3 I made (1 React SSR, 1 Vue, 1 Marko SSR) are and will stay painfully slow and bloated, full of shit, even if in 2020 we should have evolved with the famous three shaking, with the famous lazy loading, etc.?
I am just frustrated.
And let's not even talk about Webpack, Rollup, Lasso, those module bundlers shit which are harder to configure and understand than finding a needle in a haystack.
Lasso was the easiest to configure but I anyways can't understand it. Webpack seems it was made to handle SPAs, as any tool in this freaking world, and not even considering an easy way to integrate multiple bundles for multiple pages (I know it's pretty easy, but with component sharing between pages and big unique bundles Next.js handles it soooo bad it feels like hell).
Am I the only one?
Sorry for the long rant. I just needed to rant right now.17 -
To the guys that develop any form of hybrid applications, is there literally no js templating engine that accepts template files as its base? I could write probably a single file that just returns the template and then all the others request it before templating, but seriously, is there no ready to go solution?5
-
What is everyone's thoughts on dynamically creating html using templating or other methods with javascript or jquery?4
-
@ everyone who keeps pushing Vue via node
Vue via npm:
- shit
- bundling so you can save 15% on car insurance
- webpack/etc to condense your 50TB node_modules folder
- have to deploy, if you're in the US then it'll probably be in the middle East or maybe North Korea if that falls out
Vue via script tag:
- works awesome
- pretty feckin fast
- can be deployed purely static
- easy debugging from dev console
- easy templating for frontend
- can use existing html/css
- easy to work in teams with people without having everyone install npm
- if you have a designer they will love you for making it easy to style things
- you can cache it and make it offline without any of the new bullshit vuex
- you can use vanilla libraries without a mixin, polyfill, bundler, or etc anus -
Half a year or so ago I threw together a quick site for an old teacher of mine. Got a bit of cash for it and all was good. Now he needs a few changes, plus a whole new interactive page. Oh well... I restructured the whole thing and wrote a bare bones templating system in PHP. It can parse markdown files, so now he can fix his own fucking spelling errors. So now the shitty piece of crap is maintainable. Thanks fucking God for that.
-
I want to start with Web development and for that I want to code a dashboard for finances with a connection to an Restful API.
I know HTML, CSS, TS and some JS. But I don't know which framework to use.
The framework should:
- have an easy way to separate HTML from JS or TS code.
- easy way to break down a single page into different html files.
- not have to use npm or Node.JS. Preffered is a CDN solution.
- HTML Templating
Maybe also tutorials on how to setup the coding enviroment.8 -
Oh now that I'm remembering, this is how I learned PHP. It's not my specialty, but I'm writing a small plugin for WordPress.
I was in a dinner with my partner's family. One of their parent's siblings manages the IT in their company, and we had this conversation:
family member: So what language do you know?
Me: A bit of C and C++, and I did a project last year in Java/Kotlin. But my current project uses mostly Python.
Family Member: Oh Python? But Python is a very easy language, even I could learn pretty quickly. That's why we don't use it in my company. We use PHP.
Challenge accepted!
Within a week I was able to learn PHP and some basic templating library, and replicated most their company's website into a new server.5 -
I have been coding since 2016, am I overthinking applying for jobs because Im not that "current"? (my React experience is not that deep, I have been working on our startup whos stack doesnt use React or any other front-end framework (only simple handlebars templating))
I have built an actual stable working web platform and mobile app through ionic, is this enough to get a decant non-junior job?
I have never actually worked at a company, its been freelancing and startup (we failed, moving on). Am I overthinking how good I need to be to get a job? I like this one local company but I dont want to screw it up, Im sort of delaying applying there because of it7 -
Every email that starts with *|MC_PREVIEW_TEXT|*
People stealing from Mailchimp templating engines1 -
When I wrote a templating engine (great overstatement) just for myself to learn, I had this bug in php5 and regex that would crash the whole apache server.
Literally nothing worked and I didn't know why. After rebuilding everything I tried with regex using only simple string manipulation all of a sudden everything worked fine. -
I nearly never actually had to code for an interview, since I decided not to work in the gaming industry. Only ever I can recall was them asking me to define a templating engine / Syntax of my dreams.
-
I use the ICU format often for translation because it's simple enough and supported on many platforms. It's something of a standard so I can use the same translation string format and similar library functions everywhere.
ICU is like a really simple templating language, somewhere between printf and something like smarty or twig simplified and specifically intended for internationalisation.
I updated a library providing ICU compatible parsing and formatting for one of the platforms I'm using and find tests break. I assume that only thing to change is the API. ICU very rarely changes and if it did it would be unexpected for it to break the syntax in a major way without big news of a new syntax.
The main contributor of the library has changed since some time last year. Someone else picked up the project from previous contributors.
Though the library is heavily advertised as using ICU it has now switched to using a custom extended format that's not fully compatible and that is being driven by use case demand rather than standardisation.
Seems like a nice chap but has also decided for a major paradigm shift for the library.
The ICU format only parses ICU templates for string substitution and formatting. The new format tries to parse anything that looks XML like as well but with much more strict rules only supporting a tiny subset of XML and failing to preserve what would otherwise be string literals.
Has anyone else seen this happen after the handover of an opensource library where the paradigm shifts?3 -
TL;DR, which is the best JS templating library?
I've been using React for a while since I like the library's ideology and how simple designing templates is. But for the sake of future technologies, I've been wondering if I could get out of React and start coding with native JS.
The only problem is constructing the DOM, which gets super ugly with vanillaJS. So, I want to ask the experienced members of devRant which library would best suit my use case.6 -
Google is like the parent or teacher who is never happy with your work. I've never seen something so unattainable in a world where non-technical clients rely on CMSes, theme templating, server-side page rendering, and external scripting as Google's mobile PageSpeed recommendations. Especially under the Lighthouse audit in Chrome Inspector. Unless I go back to pre-2001 web development methods, and never have external scripting, and make every page have its own CSS file with only critical path CSS for each page, I will never get all the high scores I'm expected to have to rank well for mobile. When and how will Google get called out on this B.S.?9
-
Hello, does anybody know a good templating library like Liquid for .NET?
The problem is that it has to work well with F# and immutable types.5 -
I don’t want to have anything to do with your shitty templating language. I hate Jinja2. Just keep it away from me.
-
No matter how many times I have to rewrite functional code, no one will ever convince me that dynamically creating JavaScript with data binding templating languages is a good idea (JSP, php, etc)3
-
A project where there was no templating at all and every page was independent of each other, it was that bad I started from scratch.
-
Need to create an internship portal for students and companies to register, sign in, post internships, apply for internships, browse internships and a minimal admin panel, for the entrepreneurship cell I'm college
(cuz the guy who was supposed to do didn't do jack shit in three months, so I have to make a quick one in three days)
Any suggestions on what should I use?
My current options are PHP and Node-Express, but I'm not fixated on either, and the minor details like the templating engine, how to store data, how to implement authentication etc... -
HTML: Tags. I fucking hate them. Yes, Emmet makes it fast and simple to create them, but when restructuring or deleting things it becomes a mess every time. And I cant use a templating engine (i think it's called) at work, also I havent found one that I like.
CSS: Trying to apply CSS to Angular Bootrap Components. Everything has a shadow dom + a lot of things are ! important for some fucking reason. -
What's the general Software Engineering rule of thumb again for frontend templating code?
If I look at certain websites, I notice some code smells in PHP such as:
$.modal = <?php echo $(base)["username"] != 'me' ?' ': echo 'style="display=none"' ?>
or just in general places in the code where PHP gets used as a templating engine for gluing together pieces of HTML code based on conditionals spread out over the codebase and the database itself too. To make things worse, this carries over to JavaScript ajax functions. As a developer, this to me just seems like spaghetticode.
On the other hand, many popular frameworks properly do templating, such as EJS, containing templating in one place and not mixing it with logic too much but just having simple output like <%= %>.
I know I've seen frameworks like Angular 1 contain pieces of HTML into directives, but maybe that's something different, more 'OO'-simulating or cleaner.3 -
Recently attended an interview. The guy was some random company consultant. Job description was for spring-boot (also required templating engine experience). He was asking me whether I know angular and JEE (completely different and kinda opposite of the job desc). That's a bummer but good thing I've messed around with these once or twice so I know whatsup.
Also, who the fuck has already got 7 programmers and wants to double up to 14 by only adding university students to the team (after teaching them angular and jee for a month, but whatever, its only a fucking month), in order to complete a new project with tight deadlines?
I don't think I'm sticking with this one...2 -
Learning Falcon right now. Coming from strong front-end background having learnt Redux, React and stuff,
Falcon is what a backend framework must be! Why do you need templating in backend these days?8 -
I am busting moves rn. I'm in the bathroom but the surge of energy is making me pump my arms like the time Leo Messi scored a clutch winner against Valencia in 2019
Remember the plugin I referred to in this rant? https://devrant.com/rants/6019851/...
Yup! I managed to subdue that fossilised codebase. Effected all changes required. To have a rough idea about how ancient the code is, its classes use constructors predating PHP 5. It throws away the ~15 years of autoloading, view templates, routing engines, DI, ORMs (NO PDO!!), lower-cased multi word variable names, etc. I'm looking at SCRIPTS with raw functions north of 4-600 lines. The client insisted I zip the folder across
BUT! The good news is, we surmounted it. In fairness to them, it's commendable for one man to have pulled this off. The codebase is massive and appears to have been predominantly written by some Gideon dude. Who knows where he is now
There is one pattern I appreciate –something I wish Transphporm does–some segments of the rendered view are composed using class methods ie instead of having the HTML file mixed with templating syntax, you have class methods that receive the raw data. Then you can extend this class as you wish, overriding just the method that composes the segment you intend to modify. That was elegant to work with. But it can become dreadful if the class expects a specific structure of data (an array with weird keys) that you have no access to sourcing
So, I finally get to enjoy one good evening in 2/3 weeks. I called 2 friends to express an emotion that's not gloomy, but they were unavailable. Will probably get some sleep4 -
Hey errrbody!!!
I'm banging out a couple "showcase" mobile apps for practice, portfolio, and/or as potential templating tools.
I have no issue writing the code, I just wanted to see if I could get a couple pointers as far as user databases go. I'd like to have some "user profile" features generated from a FB...vlike profile images, name, address, contact, yadda yadda yadda. I usually use Firebase, but I am still having a little trouble with the more advanced stuff when it comes to integrating users profile data. I can get values from Google and whatnot, but I'd like to see what my other options are on the smaller scale.
I am currently writing code in Flutter/Dart, ReactJS( not native!), Vanilla Js, Python, and CPP.
I know there's options for client side storage like Shared Prefs, Sqflite, etc, as well as server/DB side stuff like Firebase, Aws, Mongo, Node, SQL, etc- you get the idea.
I just want something with decent documentation that's reliable, not a massive undertaking (at least not for all this little stuff, anyways) and could potentially be a go-to platform configuration in the future. It'd be cool to wire in my Flutter and js shit of possible, bit honestly I'm cool with having separate setups for the time being. Any extra input regarding the use of python and/or cpp as well (either separately or with mobile) would be rad as fuck!!!
I do realize it's a pretty vast area to cover, but I figured it couldn't hurt to see what everyone likes to use for full-stack setups.
Thanks!!!!9 -
My side project has been a SPA. One part was to make it "serverless" (folder of markdown and html files for content,config.json, no database). Another part was I wanted anybody to be able to choose whatever theme/framework they wanted and easily be able to change the config file, so I looked for a templating framework... and found PugJs. I choose it solely because I liked the logo :^).
3 days later, after successfully figuring out how to use pugjs on the client side, implementing different templates, and making sure everything loaded in the right order. I tested how big the website was without any content.
Woof.
So I'm just going to use a feature that was already in Bone.io to begin with :^). (Bone.io has a router and a "view mount" feature) -
I love laravel. But I hate blade as it's templating engine. Why didn't they choose pug. Its so much more readable. I know I can have it by packages. But I would rather see it as the default.10
-
Using twig templating language. It gives you error messages, but it only tells you the error of the line in the twig template. This is ok until you go to that line and it calls a twig function, which goes off to a load of different classes. Why not tell me the exact class where the error is, or even the line number in the class. Instead you have to unpick it until you find the bug yourself!
Am I missing something? Or is this just the way it works? -
Funcking symfony 4. THey give error:
You can not use the "render" method if the Templating Component or the Twig Bundle are not available. Try running "composer require symfony/twig-bundle".
I have run this command to required twig bundle, it installed succesfully and still there is the error. Wtf. Cannot use fucking stupid simple twig.9 -
Can any one recommend a good Go framework for APIs with a MongoDB ORM?
Was using Laravel 6/Lumen but it’s API ability is starting to piss me off with its CSRF crap, JWT/Passport implementation and a it’s lack of MongoDB support.
I don’t need any templating engines at all, its all handled by a SPA and Mobile Apps6 -
!rant
So, I've been working on a few Django projects at my company & we've been handling it quite well up until now. For those who don't have an idea of Django, it uses templating format as it's frontend & the data is served using APIs or context'.
Now the problem is, we're been told to use React js at the fronted with the current working projects.I've even gone to the 5th page of google & still haven't found a useful blog/answer on how to use react with django (i know that django rest framework will serve the apis).
There's no clear documentation for this. Even if there is, it's only basics which isn't quite helpful in my case.
So anybody can please guide me through or even provide a syntactical way to get this done, I'd be really grateful.
Thank You,
Your fellow devRanter -
We are switching our frontend templating language from dust.js to twig.js... Today I converted 1600 lines of dust to twig.
Do you know the feeling, when you're so hungover that if you see just a single drop of alcohol you have to throw up? I feel the same way about dust right now.1 -
I want to ask for your opinion guys, because I don't know if I am right or wrong.
So, some days ago, my brother sent me some code to check out for an automation that he does for testing purposes, since he's a QA (I am a programmer). He should be able to send XML data to a server and depending on the process that he tests, the data is different every time. I saw a strange thing, he hardcodes the XML tags and concatenates them with data which I find stupid. So I proposed him to use a template to generate XML data, because I think it's more flexible and easier, making data and presentation separate. That way if in the future he wants to start using JSON he could do it in no time. I made the code in a separate file which he imports and uses it's functions (they are two so no need for classes) and uses them to load the template and render it as he passes the data as a hash table. He insists that concatenating data and XML tags is easier and simpler and I can't wrap my mind how could that be true. I gave him an example in which the data structure for a process is changed and he have to open the file and change the XML tags or the structure and he still says that's simpler.
What is the right decision in this situation. Keep in mind that I simplified the process a lot and it actually involves sending the data and reporting the results, but they are not important here since I am talking only about generating data. -
#Suphle Rant 7: transphporm failure
In this issue, I'll be sharing observations about 3 topics.
First and most significant is that the brilliant SSR templating library I've eyed for so many years, even integrated as Suphle's presentation layer adapter, is virtually not functional. It only works for the trivial use case of outputting the value of a property in the dataset. For instance, when validation fails, preventing execution from reaching the controller, parsing fails without signifying what ordinance was being violated. I trim the stylesheet and it only works when outputting one of the values added by the validation handler. Meaning the missing keys it can't find from controller result is the culprit.
Even when I trimmed everything else for it to pass, the closing `</li>` tag seems to have been abducted.
I mail project owner explaining what I need his library for, no response. Chat one of the maintainers on Twitter, nothing. Since they have no forum, I find their Gitter chatroom, tag them and post my questions. Nothing. The only semblance of a documentation they have is the Github wiki. So, support is practically dead. Project last commit: 2020. It's disappointing that this is how my journey with them ends. There isn't even an alternative that shares the same philosophy. It's so sad to see how everybody is comfortable with PHP templating syntax and back end logic entagled within their markup.
Among all other templating libraries, Blade (which influenced my strong distaste for interspersing markup and PHP), seems to be the most popular. First admission: We're headed back to the Blade trenches, sadly.
2nd Topic: While writing tests yesterday, I had this weird feeling about something being off. I guess that's what code smell is. I was uncomfortable with the excessive amount of mocking wrappers I had to layer upon SUT before I can observe whether the HTML adapter receives expected markup file, when I can simply put a `var_dump` there. There's a black-box test for verifying the output but since the Transphporm headaches were causing it to fail, I tried going white-box. The mocking fixture was such a monstrosity, I imagined Sebastian Bergmann's ghost looking down in abhorrence over how much this Degenerate is perverting and butchering his creation.
I ultimately deleted the test travesty but it gave rise to the question of how properly designed system really is. Or, are certain things beyond testing white box? Are there still gaps in the testing knowledge of a supposed testing connoisseur? 2nd admission.
Lastly, randomly wanted to tweet an idea at Tomas Votruba. Visited his profile, only to see this https://twitter.com/PovilasKorop/.... Apparently, Laravel have implemented yet another feature previously only existing in Suphle (or at the libraries Arkitekt and Deptrac). I laughed mirthlessly as I watch them gain feature-parity under my nose, when Suphle is yet to be launched. I refuse to believe they're actually stalking Suphle3 -
Spent all day fucking around with a tool, hoping to make it work, only to realize that I could just use Jinja templating and a cheap command line alias to render the template all along.