Huhhm... (a sigh of lost hope)
The world of a quiche eater isn't openly documented, well here is everything looming in my mind at-least just about how
i think ui dev should be.
Here is the backstory :
I started my development journey by building android apps using DroidScript (a javascript framework), the issue is it's not cross-platform.
NOTE : I refer to the native way of building ui.
The native way looks something like this:
function OnStart(){
let main = app.CreateLayout('linear','fillxy')
let btn = app.AddButton(main, 'A simple Button', 0.8, -1)
app.AddLayout(main)
}
I've gotten so used to building ui this way it seems correct,
I feel at peace, I feel at home.
I have built direct copies of popular design schemes for DroidScript using the native android ui api's provided like Material Design 3.
I find my-self having to compromise I hate the thought of typing so much HTML and CSS to get something i feel proud of, the switching between these too is annoying.
Well, you could say why not learn a framework like React or Vue.
They all have that xml syntax and i don't like it, while i love web components they make me hate the xml syntax so much more...
now i have to add a f*** dash.
I have tried a multitude of frameworks,
I did React and i love the way i can call functions and build ui, i just don't feel well with React Query and how much i have to learn and things don't come pre-built. I hate thinking about a which state management solution.
I did bits of Vue to be honest i did like it, but i feel so much away from the development i like, keep in mind i hate xml syntax so as Vue is catching strays Svelte isn't safe too.
I did Solid online though, yeah i think I'm fine.
Before this, i did install Next.js i might give it a try looks fire, but i may have to swallow the hard pill this time.
Okay but what have i done since i dread xml syntax
I made my own framework i called it SquidBASE.js and i didn't go through with my promises, deleted it and gave up.
The hate boiled up again,
I tried a different approach, i built innerscope.js and it flopped i just
couldn't get it to align with what i want.
I previously even made an article about innerscope.js bashing how frameworks are getting it all wrong, i won't delete it though >3.
Now i am on my third attempt viewml.js
The motivation i will succeed is low, the development of it is a major
blow to my ego, i hate having to ask that dreaded LLM for help.
I'm just copying i want to be that 10X developer, but everything feels so hard.
Anyway my plan is I'm not going to copy exactly how DroidScript operates, but i have figured out why it felt so good its the separation of concerns, lets you write ui, and up-to good ui without involving css nor html.
Now look I'm not that bad of a quiche eater, CSS is great so i decided to call everything from the js side, embed element focused styles onto that element using a css-in-js way.
Here is the hierarchy of the project :
/* As a class glazer, Application class
is the top level and we have an onStart function to be the start*/
class Application {
onStart(){
let main = vml.addLayout("main", "linear", "vertical");
let bannerdiv = vml.addHtmlEl(main, "div",'center,vertical');
/* With Any Div, or Element, its children can be aligned
* a certain way thats why we got the center, certical options
* now you dont have to add the css for that, and call from
* a function
*/
let banner = vml.addHtmlEl(bannerdiv, "h1");
banner.textContent = "The framework for staying in the flow";
banner.id = 'banner'
banner.css`
letter-spacing: 0.5px;
margin-top: 15px;
font-family: "Inter", sans-serif;
font-wight: 700;
font-size: 48px;
color: #213547;
text-align: center;
overflow-wrap : break-word;
`;
}
}
I can't demonstrate this well, in a blog post but i'd advise you check the App.js code in the github : viewml App.js File
Now all of this takes me in all different places.
I feel like i have got everything mixed up, sometimes i think maybe it's not for me, or its just that maybe I'm the issue, the world loves that
xml syntax and i haven't found someone who shares these thoughts.
Also with job concerns this even takes me on a scare loop, will i find a job or this will be a hobby that cannot elevate me because i don't want to fit in the world that exists and the way it works.
Or i am overthinking advise me.
Top comments (1)
Seems to me that you may be well of with a better set of developer tooling rather than building a new framework (not that there's anything wrong with it).
Overtime, in my experience, I have learned that any boilerplate that I pick off the internet, isn't going to align with how I want to do things or how I have been doing things recently. Instead of writing a framework that works just for me, I opted to do some R&D and built a couple of different boilerplates (didn't even had to build from scratch, just took some popular/good ones and modified them to my own needs). Having this, gives me the edge to start a new project rather quickly and I am always in the familiar territory.
However, if you still feel like you need to write your own framework, my best wishes with you!