[HN Gopher] Lucee: A light-weight dynamic CFML scripting languag...
___________________________________________________________________
Lucee: A light-weight dynamic CFML scripting language for the JVM
Author : mooreds
Score : 51 points
Date : 2024-08-31 15:10 UTC (7 hours ago)
(HTM) web link (www.lucee.org)
(TXT) w3m dump (www.lucee.org)
| ValentinA23 wrote:
| CFML ?
| bdcravens wrote:
| ColdFusion Markup Language
| acdha wrote:
| Cold Fusion Markup Language - the CF application server was
| really popular in the 90s and early 2000s because it was a
| fairly approachable HTML-like templating language which had
| some good shortcuts for things like form processing and was
| cross platform in an era where that mattered more along with
| supporting most popular databases.
|
| The thing which killed it was poor performance (PHP 3 was
| 10-100 TIMES faster in tests I did for our customers) and
| Adobe-level support. They milked customers mercilessly and
| refused to fix even major bugs - as an example, we had an app
| which generated a report table like this (I forget the exact
| syntax): <cfloop query as row>
| <tr> <cfloop row as col>
| <td>...
|
| They had a bug using a shared pointer internally so that would
| print the first row over and over for the number of rows. We
| reported this. Not fixed, but then they told us the next paid
| upgrade might fix it. It didn't and we moved the remaining
| customers to PHP, which we'd already been going for features.
| tombert wrote:
| IIRC performance got considerably better when they moved to a
| JVM-based thing, but yeah it was always pretty slow. It
| doesn't help that they sort of advertised it for non-
| programmers, meaning that there wasn't exactly hyper-
| optimized code being written to begin with.
|
| I one time worked for a company that had a import on the top
| that called every single SQL query as part of the template,
| meaning that there was about ~20 SQL queries running
| sequentially on every page load. I think just using the
| built-in caching for it improved performance by an order of
| magnitude by simply utilizing the built-in caching.
|
| I think what killed Coldfusion was really the price. PHP was
| free, open source, faster, and also had easy templates
| integrated into the language. Why pay an absurd license fee
| for a slow language when you can get something comparable for
| free?
| acdha wrote:
| The JVM pivot helped but IIRC it was still far behind PHP.
| If memory serves we noticed it most on database drivers -
| PHP used the native bindings but CF used ODBC/JDBC and that
| hurt them a lot for reasons I assume we're not easy to fix.
| There was a usability argument for CF in some cases but as
| you noted it wasn't enough to cancel out being proprietary,
| especially once there was a stable of people with PHP
| experience to hire.
|
| > I one time worked for a company that had a import on the
| top that called every single SQL query as part of the
| template, meaning that there was about ~20 SQL queries
| running sequentially on every page load.
|
| This is bringing back painful memories of the time I was
| billed out at some obscene rate to do some overtime bailing
| out a client (local utility company). We'd had the design
| side of a product locator site but they'd given the
| software side to a bigger contractor, and 12 months into a
| 4 month project they were missing half of the features and
| the developers were telling them they needed to drop a
| million on a high-end server to handle the database. I
| looked at it and quickly found the problem: none of the
| developers knew SQL well enough to know how to filter a
| JOIN, so they had multiple nested ASP loops which were
| retrieving hundreds of millions of rows, using an if
| statement to decide which ones matched the active filters,
| and then did more queries in the inner loop. The client
| paid double our normal rate for me working a few late
| nights, got five orders of magnitude better performance,
| and had a very interesting conversation with the original
| team about the money they had been billed for people who
| clearly weren't the senior engineers they'd been paying
| for.
| tombert wrote:
| > PHP used the native bindings but CF used ODBC/JDBC and
| that hurt them a lot for reasons I assume we're not easy
| to fix.
|
| Tangential, but JDBC, even in the year of our lord 2024,
| has been one of my biggest headaches for performance. I
| have a pretty decent job with a very decent manager, so I
| started replacing as many JDBC calls that I could with
| Vert.x and got considerably better performance, I think
| because JDBC is so block heavy and threads just spin
| idling a lot.
|
| > none of the developers knew SQL well enough to know how
| to filter a JOIN, so they had multiple nested ASP loops
| which were retrieving hundreds of millions of rows,
|
| We didn't have hundreds of millions of rows, but at the
| Tae Kwon Do studio I worked at (who had their own martial
| arts management software), the initial person who wrote
| it wasn't great with SQL, and for the "belt management"
| service the person who wrote it was similarly doing lots
| of nested loops and conditionals on those loops, all in
| Coldfusion. Another employee that was pretty good at SQL
| ended up rewriting everything with a lot of clever joins,
| views, where clauses, brought down the runtime by like
| three orders of magnitude.
| bdcravens wrote:
| Great product. It was forked from Railo (no relation to Rails),
| and the founders of Lucee came from Railo when they didn't like
| the direction Railo was going. The point is that Lucee is 16+
| years old, and a popular alternative to Adobe ColdFusion.
| aidos wrote:
| I ended up doing cf almost by accident for quite a while (like,
| 8 years) and was there as it went through the adobe -> railo
| transition.
|
| Coldfusion had a bad rep but it was actually a pretty good tool
| to work with. Railo made it a million times better in every way
| - the performance was solid and the environment was full
| featured enough to let you focus on the code.
|
| The original adobe (macromedia, right?) version was a mess.
| There were no functions but you could import modules. Massive
| caveat that those modules were allowed to mutate state outside
| of themselves so people would import them to, for example, run
| some db queries and set some variables in the calling code with
| the results. You can imagine the absolute unmaintainable mess
| that ensued.
| oooyay wrote:
| Before it was bought by Macromedia ColdFusion was produced by
| Allaire (the Allaire brothers):
| https://en.wikipedia.org/wiki/Allaire_Corporation
|
| I want to say Macromedia mostly bought ColdFusion for it's
| editor. The language seemed to be a bit of afterthought.
| esprehn wrote:
| There were custom tags since 1997 (v3) and functions since
| 2001 (v5).
|
| https://cfdocs.org/coldfusion-versions
|
| CF is interesting because it started as basically server side
| includes with some extra features to connect to a database.
| It was meant to be very approachable and not general purpose.
| Like a distant ancestor to Jupyter and Observable.
|
| That approachability made for some big messes, but it also
| spawned a huge community of software developers who might not
| have gotten into it otherwise.
| aidos wrote:
| To be honest I don't quite recall the history anymore and
| no doubt the place we were at was late with adoption. My
| first day they said "congratulations, you've just inherited
| 3 million lines of confusion"
| bitexploder wrote:
| It did the same thing PHP did in terms of convenience. Made
| it easy to generate "dynamic" HTML. Everything was a template
| in a sense. It grew into a more serious programming language
| and platform. Fond memories of year 2000 :)
| tombert wrote:
| I've joked for awhile that I might be literally the only person
| on earth who has had paying work in Coldfusion, Foxpro,
| ActionScript, Erlang, Haskell, and F#. I don't that for sure, I
| haven't taken a global survey, it just seems like a pretty
| obscure pairing.
|
| When you drop out of college, you take whatever job you can get.
| My first software job was doing ColdFusion, ActionScript, and
| Foxpro for a Tae Kwon Do studio. I didn't really know Coldfusion
| or Foxpro, but I picked them up relatively quick, and while I
| never really liked either of them, I did appreciate how quick I
| was able to prototype stuff in Coldfusion.
|
| It was relatively easy to go from 0-to-website with CFML and get
| something that more or less worked, and even had a few niceties
| as well; the SQL support was actually quite good (including
| built-in caching), you could fairly easily call out to Java
| libraries, and it was easy enough to remote with Flash/Flex,
| which was still relatively useful.
|
| I found it almost impossible to actually maintain anything, and I
| don't think I'd use it for anything now (particularly since I
| dont' do any frontend anymore), but there's a sentimentality that
| I will forever have for Coldfusion, if for no other reason it's
| the thing that kicked off my career.
| hackthemack wrote:
| I had to work on quite a few coldfusion sites in the 1998 to
| 2010 timeframe. I found having to write brackets for each and
| every statement to be tiring; <cfif> <cfelse> <cfset var
| mystuff "johnnyb">
|
| Eventually, they incorporated cfscript which let you write
| stuff that was more like the c derived languages. But they did
| not port every <cftag> function over to cfscript. Terrible
| oversight. If you had to resort to ending your cfscript to fall
| back to a cftag it made the code really ugly.
|
| <cfdump> was ahead of its time. It came out way before php
| var_dump.
|
| <cfquery> was really powerful. It let you take any database
| result and then treat that result as though it were a database
| itself. So you could query a query so to speak.
|
| Something else I remember is how many ColdFusion devotees I
| worked with. I never understand how people get so attached to a
| language (ColdFusion, Ruby), a company (Apple), or a database
| (Postgres, MongoDB). It becomes some kind of cult. So many
| defensive ColdFusion programmers I had to deal with.
|
| Edit to add another memory. Old ColdFusion would use YES for
| true and NO for false. That would cause a lot of headaches when
| dealing with other systems that had no notion of YES or NO.
| tombert wrote:
| > ventually, they incorporated cfscript which let you write
| stuff that was more like the c derived languages. But they
| did not port every <cftag> function over to cfscript.
| Terrible oversight. If you had to resort to ending your
| cfscript to fall back to a cftag it made the code really
| ugly.
|
| I never used cfscript for this reason. I felt like if I
| couldn't use every feature of the language, then there's no
| point in messing with it.
|
| I definitely miss cfdump sometimes. It was ridiculously
| useful for what it did.
|
| > Something else I remember is how many ColdFusion devotees I
| worked with. I never understand how people get so attached to
| a language (ColdFusion, Ruby), a company (Apple), or a
| database (Postgres, MongoDB). It becomes some kind of cult.
| So many defensive ColdFusion programmers I had to deal with.
|
| Yeah, even when I doing that job (2012), Coldfusion was
| falling out of favor, and I would mention to my manager that
| we might want to start transitioning to Railo or rewriting
| stuff using Java EE or something, and would get _extremely_
| defensive about it. He was more polite than this, but he
| basically said something that implied that I didn 't know
| what I was talking about and Coldfusion will still be used
| for years and years to come.
|
| I guess he was half right :)
| troupo wrote:
| ASP Classic, Coldfusion, PHP, Erlang, Java, C#, Javascript here
| :)
|
| CFML was weird, but true, it worked. I felt it was like PHP for
| JVM: type stuff run site, everything works
| tomcam wrote:
| > I've joked for awhile that I might be literally the only
| person on earth who has had paying work in Coldfusion, Foxpro,
| ActionScript, Erlang, Haskell, and F#
|
| What, no Clipper?
| westurner wrote:
| Similar to ColdFusion CFML and Open Source: ZPT Zope Templates:
| https://zope.readthedocs.io/en/latest/zopebook/ZPT.html
|
| https://zope.readthedocs.io/en/latest/zopebook/AppendixC.htm... :
|
| > _Zope Page Templates are an HTML /XML generation tool. This
| appendix is a reference to Zope Page Templates standards:
| Template Attribute Language (TAL), TAL Expression Syntax (TALES),
| and Macro Expansion TAL (METAL)._
|
| > TAL Overview: _The Template Attribute Language (TAL) standard
| is an attribute language used to create dynamic templates. It
| allows elements of a document to be replaced, repeated, or
| omitted_
|
| Repoze is Zope backwards. PyPI is built on the Pyramid web
| framework, which comes from repoze.bfg, which was written in
| response to Zope2 and Plone and Zope3.
|
| Chameleon ZPT templates with Pyramid
| pyramid.renderers.render_to_response(request):
| https://docs.pylonsproject.org/projects/pyramid/en/latest/na...
| thrownaway561 wrote:
| The market share for this is probably 4 people. It amazes me that
| ColdFusion is still around. I have a client currently that I just
| helped upgrade to Adobe ColdFusion 2023. I even asked them if
| that looked into switching over to Lucee to save that obscene
| licenses costs from Adobe, but they said that they couldn't
| because of some of the incompatibilities. I didn't get into what
| they were, I should continue that conversation.
|
| <cfdump> <cflog> <cfflush>
| conception wrote:
| I wouldn't recommend it for anything large but for fast internal
| tools, CFML is faster than anything I've seen to get something up
| and usable. When Covid started we needed to track testing and
| positives and notifications - all the fun stuff. And it needed to
| be up in running in three days. The next day I had a release
| candidate and we deployed and announced it on the Monday. Similar
| places took weeks or had to wait for off the shelf products.
|
| Would I sell it what I made? No, but if your primary concern is
| getting stuff done, it surely will.
___________________________________________________________________
(page generated 2024-08-31 23:00 UTC)