Lucee: A dynamic, Java-based, tag and scripting language for web app development
github.com
github.com
People have a lot of hate because, Coldfusion, but actually, they got it to a really good place. It has a lot of stuff baked in, so you can configure everything like dB connections, mail settings etc outside of your app and they’re available without any messing around in your code. CFML is actually a pretty clean templating language and everyone had switched to “cfscript” for the actual code. Also, it was relatively fast, and you could plug in any java classes you wanted (and even load them dynamically).
My point is, don’t be too quick to judge. This is actually a good bit of work that came along after it’s lineage had fallen out of fashion.
At this point the only thing you can glean is it resembles java and it’s targeting the JVM.
A true start to finish hello world or basic app would be nice to see.
The only meaningful use case I see in Lucee is to be able to run and maintain legacy CF applications in an environment that is still supported without rewriting them for a more modern and capable language/runtime. It would be best utilised for putting legacy applications on life support, not for creating the next big thing.
It may not be as popular as other languages but it has two advantages:
1. Rapid application development
2. A glue that ties other enterprise apps together
I got into a fight on Twitter over using CFML for new projects with a rather prominent fellow in the coding world. The year was 2008 and a lot of apps have been written in it since then;<).
If you want legacy support, simply use the older Adobe provided Linux CF engines.
Look at the Coldbox framework and you will be pleasantly surprised at the implemented best practices and ease-of-use, all running in Lucee.
Why not? The environment is feature rich, runtime performance is fantastic, developer productivity is exceptional, and integration is compelling because it runs in the JVM. Yes, the JVM. So even if Lucee doesn't do what you need, you can natively call upon countless Java features like javax.script or javax.crypto, or third-party Java libs like JSoup or Lucene with just a couple extra lines of code.
And yes, like any language, it doesn't stop you from writing incompetent and stupid shit. The one big knock against the ColdFusion-inherited language is that the templating syntax is often overused for writing code, when it also has a great C/Java/JS-style scripting syntax.
Right on the front page a simple snippet example would already do wonders. Especially if the "rapid prototyping" is a key attribute.
echo "Hello World" > hello.cfm
I think the thing that's missing here is the context on the history. For most people using this project, they've come from CF (Adobe). It was "Hey, using CF and having a hard time with Adobe's code quality? We've made an opensource alternative! It's identical, but without the bugs and with these extra features..." And I guess the story for starting with it from scratch hasn't been more carefully considered.or
writeDump("Hello World!");
Before you can do that though, you need to install the CFML engine. I recently published a tutorial that shows how to install Lucee in Tomcat very easily:
https://www.youtube.com/watch?v=nuugoG5c-7M
http://blog.rasia.io/blog/how-to-easily-setup-lucee-in-tomca...
To make your Hello World example a bit more interesting, you can add the tag `<cfoutput>` with some dynamic content, e.g.
<cfoutput>
Hello World on #dateTimeFormat(now(), "mm/dd/yyyy 'at' HH:nn:ss")#
</cfoutput>
See example at https://trycf.com/gist/226c10cbe74d4083743a617b25398224/luce...Enough already to entice further curiosity now to explore on the dynamic content portion and start thinking on where this thing can be used on my daily tasks. All the best with Lucee.
The best approach would be the ColdBox framework at https://www.coldbox.org/
It is very unclear what this is, how to use it, how to get started, where to find a simple example.
Everything is spread out over 50 different links and pages with labels like
Getting Started Start Here First Steps
and none of that is really applicable to actually "what do I do to use your product".
Seems like an assumption one would make who doesn't intend for their project to survive or grow. Don't they want new users, or just a continuously decreasing set of current ones?
And it would seem like working on a project with those intentions would be a waste of time for all involved.
> "it's really just ColdFusion/CFML, cfdocs.org is the best resource"
This should be the first thing I see on the website with a link to cfdocs.org
Edit: So, there's a link to docs on the Github page. http://docs.lucee.org/. You need to click "About Lucee", and ignore the page they take you to, then, in the nav-bar you need to click "Why Lucee Server's great". Or, if you didn't have the patience, you can click here https://docs.lucee.org/guides/about-lucee/why-lucee-server-g...
This definitely needs to be the first thing I see on the Github page...
I hope I'm wrong?
There's a lot of built in security to Lucee/CF but for a query I'd always be doubly sure and explicitly state the parameter data type as well and that'll definitely block SQL injections. So this code would be:
queryExecute( "select * from employee where id= :itemID" { itemID = { value=arguments.itemID, cfsqltype="cf_sql_varchar", list=true } } );
SELECT * FROM #strDatabasePrefix#_courses WHERE intCourseID = <cfqueryparam value = #intCourseID# CFSQLType = "CF_SQL_INTEGER">
You would also want to protect your input variables so that you only get what you're expecting.
There's also a free service called HackMyCF that lets you check your server after you've hardened it with the guide that comes with both Lucee and Adobe CF.
That’s putting it nicely. What’s happened is you’re showing users the wrong way to do something without it being explicitly clear to them. Then we wonder why people write crap code...
My view is NEVER simplify an example to the point it becomes a security or performance hazard.
What this tells me now is that this projects examples are not useable, their agenda is to make things appear easy when in fact concrete examples may not be.
There are also frameworks that do the sanitization for you (e.g. Rails IIRC), and novice developers coming from those certainly might not be aware.
And 'good' needs to be put in context: e.g. a 'good' hardware or kernel engineer who never wrote front-end stuff may legitimately be unaware of the need to defend against SQL injection unless its written somewhere.
If they're as 'good' as you're expecting they would probably not even require a getting started tutorial...
Anyway, this is something I see in many tutorials and its somewhat unfair to single out Lucee. I just wish tutorial writers would put effort into real-world examples more often.
I've found it a great developer community. We're containerizing some Lucee apps and they've been really helpful.
The language is by no means dead.
Mura CMS runs on Lucee https://www.getmura.com/
It's definitely not the usual HN web building community though. Less swagger, more sell.
Learn Modern ColdFusion (CFML) in 100 Minutes: https://modern-cfml.ortusbooks.com/
Learn CF in a Week: http://www.learncfinaweek.com/
CF Docs: https://cfdocs.org/
TryCF (in browser CodePen style): https://www.trycf.com/
Nowadays, I prefer to use a strongly-typed, compiled language for server-side code (C#). I get a certain peace-of-mind when it compiles successfully that just I don’t get with interpreted languages.
You can also modify the Lucee admin settings to be compatible with older versions.
- the versions of some (most?) of the libs Adobe CF (even 11) depends on are ancient, years old, shading had to be used a lot, a lot to add things like Kafka or protobuf
- EVERYTHING loads into a single JVM process, every gateway shares the same JVM with the application server
How does Lucee handle this?
I think it is pretty cool.
cfdocs.org is a good resource; learncfinaweek.com is a good resource (but leans toward the commercial Adobe ColdFusion product, but syntax is pretty much the same). You'll want to look at coldbox.org for a full-featured framework.
master branch being broken for 3 months doesn't exactly instil a lot of confidence in something that seems to be intended to run critical legacy software
5.3 is the active development branch https://github.com/lucee/Lucee/tree/5.3
https://travis-ci.org/rails/rails
FWIW, Lucee has been around for several years. (prior to Rails) It originated as Railo; some issues with the company that owned Railo the company led to the same development team forking to Lucee.
Can Hibernate be simplified?
I made a decent career as a ColdFusion developer for about 10-years. I embraced Lucee when it first was launched, and I still use it when I get in a bind.
But that being said, I bit the bullet about 3-years ago, and switched to NodeJS. It's simplicity and speed just doesn't compare.
The CF community has failed to realise that web pages don't really refresh anymore. We are in a world where JavaScript rules the front end, single-page apps are king. So the only useful part of CF is as an API engine, and frankly, NodeJS, Go Lang, Elixir, and Python will all run circles around it.
I switched from ColdFusion years ago as my primary language cause of the job market (as i'm sure many others have), not because it is a bad language OR because it was tag based. to be completely honest, ColdFusion itself is an outstanding product and STILL is so easy for a barrier of entry and setup.
the things (to me) that are kill it a) the price is ridiculous, b) they never officially supported a framework in the era of MVC (ColdBox, FW/1, CFWheels would all have made a good candidate) and c) they never listened to their developers about features to implement.
I'll add that when Adobe CF introduced a "richer" script syntax, it wasn't complete and along the lines of too little, too late. This is where MACR stagnated. Had CF introduced a full blown scripting language in the early 2000's, CF would certainly have a little more staying power these days, especially with open source implementations like Lucee.
The biggest problem for ColdFusion is that there was a time (2008-ish) that the open source web development world innovated and evolved by leaps and bounds around it and CF stood still. One of CF's biggest selling points was that it wasn't open source and that it wasn't PHP. I'm not knocking PHP; the reality was that there were a ton of companies that would steer clear or open source projects back in the mid-2000s. If you were doing "enterprise" web development in 2003-2005, you were either doing Classic ASP, Java, or ColdFusion.
You do realize Railo (which Lucee forked from) was first released in 2004?