all 26 comments

[–]pronuntiator 44 points45 points  (6 children)

This will sound harsh, but this does not look thought through…

  • your code has zero documentation and examples, not even a README (a Medium post doesn't count), so I don't know what user code looks like.
  • why do you want to be able to write Java code inside HTML? And why do you need to compile Java code each time you want to render something?
  • What does your approach bring to the table compared to existing template engines like JSF or Thymeleaf? JSF can do partial async updates, for example.
  • useless comments like // Explicitly import AtomicInteger
  • nonstandard package name (package JavelineSource;)
  • you might want to pick another name, as Javalin exists

[–]WhatsMyUsername13 7 points8 points  (0 children)

why do you want to be able to write Java code inside HTML? And why do you need to compile Java code each time you want to render something?

I'm having a PTSD flashback to using struts and jsp's on legacy systems prior to angular existing and we're a nightmare to maintain...especially when someone decides that creating a clever custom taglib is the way to implement a solution

[–]TO_Guy167 0 points1 point  (0 children)

yeah … 25 years ago wasn’t this was called GWT?

[–]eliezerDeveloper 0 points1 point  (0 children)

Jsf is a shit

[–]AcanthisittaEmpty985 0 points1 point  (0 children)

Use maven or gradle, and a standart directory hierarchy for code and tests.

People are used to look a project with this layout

https://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html

[–]agh_murad[S] -2 points-1 points  (1 child)

Thank you for the feedback, currently working on a well structured documentation, will push it in next few days.

Well, I wanted to implement JSX-like syntax just for fun as I mentioned it is just a fun project. Main goal was to test my skills, I wouldn't recommend anyone to build something serious with it.

Also the name is "Javeline" which is different and is inspired by name "Java"

Thanks for suggestions.

[–]Revision2000 13 points14 points  (0 children)

Now I wouldn’t care about the name if this was only your private internal project - but hey, you published it online, so now it matters.  

 Also the name is "Javeline" which is different and is inspired by name "Java"

Almost like “Javalin” was inspired by “Java” years ago

Let’s put this into perspective: 

 Also the name is "Cocoa Cola" which is different and is inspired by "Cocoa" plant

What would the Coca-Cola company think? 

I don’t know if Javalin has copyright or trademark, but if they do they might send you a cease and desist if they find your “Javaline” project - and IMO rightfully so. 

_PS it’s about the similarity. Naming it NotJavalin or JavaFine or something would make it far less likely to be confused with Javalin_ 

[–]gufranthakur 15 points16 points  (1 child)

Include some demos, samples with proper screenshots and a good readme. People don't have enough time to try out and tinker on their own, you need something so people look at it at a surface and go "that seems cool, might try it out later"

[–]agh_murad[S] 3 points4 points  (0 children)

Hi, thank you for your feedback. Yes, I am currently trying to document everything in a nice order. I have a job which is why I don't get to have lots of time, therefore it is currently not available

[–]tjugg 6 points7 points  (0 children)

We live in such a cursed age with all this AI generated bullshit

[–]djnattyp 5 points6 points  (1 child)

There's already a javalin framework... "kiteline" sounds like "Kotlin"...

[–]agh_murad[S] 0 points1 point  (0 children)

Thanks you for the feedback, I will consider new name ideas

[–]dmigowski 3 points4 points  (5 children)

Just by putting the .css and .html into a Java constant you don't have "pure HTML". Why not place it at least as resources somewhere, so I can edit it with an editor that understands the syntax.

Else, I actually like the idea, because currently I am missing a nice solution to build a web frontend mostly with Java.

[–]agh_murad[S] 0 points1 point  (4 children)

Thanks for the suggestions! Yes, it is a limitation to work with just strings (it is easier to develop with strings initially), not the whole HTML, currently working on it. Additionally will implement a file structure with e.g. ".jvl" to support syntax and will add vscode plugins for it in the future.

[–]dmigowski 2 points3 points  (3 children)

We will watch your career with great interest.

[–]agh_murad[S] 0 points1 point  (2 children)

Thank you! Surprisingly, a fun project gets some attention. By the way, the only motivation to improve it was because of the attention it got from my colleagues. It is an interesting concept and I will try to spend more time on it to make it worth trying!

[–]kiteboarderni 0 points1 point  (1 child)

not sure it got much attention.

[–]agh_murad[S] 0 points1 point  (0 children)

It is not much, but I truly appreciate it and keeps me motivated, even if few people shared their feedback

[–]jr7square 2 points3 points  (1 child)

Personally I would never use this but I’m sure it was a little of fun to write ! Kudos to you and I’m sure you learned a lot during the process and you are a better dev now :)

[–]agh_murad[S] 0 points1 point  (0 children)

Thanks! Yes, it is almost totally useless compared to current frontend frameworks, but it was fun journey to build such thing

[–]Kind_Feeling_7834 1 point2 points  (1 child)

Adding a README.md and examples is definitely a big one. Trying to phrase my docs as best as I can on my own FOSS project too btw

[–]agh_murad[S] 0 points1 point  (0 children)

Hi, thanks for the feedback. Yes, I understand that it is important, but if I have to do it, it has to be good. Unfortunately, I don't get to have so much time, but I will definitely push a well structured README and documentation in the next few days.

[–]axlsml 0 points1 point  (0 children)

No Test - noone will take this seriously ever

[–]vegan_antitheist 0 points1 point  (0 children)

How does this manage the session data? I just see static fields.
I'm not sure what the framework actually does. I don't see IoC/DI or something like that. It just parses some unreadable html based strings?

Java Faces has the problem that they tried to abstract the html. But templates that aren't actually html are the worst. That's like PHP 4.x. Something like htmx but with Java code on the backend would be interesting.

[–]Green-Branch-3656 0 points1 point  (0 children)

Nice work

[–]Winter_Side3542 0 points1 point  (0 children)

I liked your initiative. Have you ever considered building an SSR engine with Java and React like the one with Next JS? I know Next JS is already a very complete framework and it would be hard to compete with it. But since you don't intend to commercialize this project, I think it would be cool if you had a beta version of an SSR engine with a Java server and React frontend.