Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Dec 15 2016 01:19

    seancorfield on master

    Elaborate on sunsetting FW/1 in… (compare)

  • Dec 15 2016 00:51

    seancorfield on master

    Strips FW/1 out of the usermana… (compare)

  • Dec 15 2016 00:50

    seancorfield on master

    Fix some typos introduced in th… (compare)

  • Dec 14 2016 18:56
    seancorfield closed #53
  • Dec 14 2016 18:56
    seancorfield labeled #53
  • Dec 14 2016 18:56
    seancorfield commented #53
  • Dec 14 2016 18:55
    seancorfield unlabeled #51
  • Dec 14 2016 18:55
    seancorfield closed #51
  • Dec 14 2016 18:55
    seancorfield labeled #51
  • Dec 14 2016 18:55
    seancorfield unlabeled #51
  • Dec 14 2016 18:54
    seancorfield unlabeled #54
  • Dec 14 2016 18:54
    seancorfield closed #54
  • Dec 14 2016 18:54
    seancorfield closed #55
  • Dec 14 2016 18:54
    seancorfield unlabeled #55
  • Dec 14 2016 18:49

    seancorfield on master

    Is FW/1 even needed? Adds an e… (compare)

  • Dec 12 2016 00:38

    seancorfield on master

    Is FW/1 even needed? A critica… (compare)

  • Dec 12 2016 00:37

    seancorfield on master

    Middleware cleanup / refactorin… (compare)

  • Dec 12 2016 00:34

    seancorfield on master

    Add Ring CORS dependency Looks… (compare)

  • Dec 11 2016 08:38

    seancorfield on master

    Provide full middleware stack w… (compare)

  • Dec 11 2016 08:37

    seancorfield on master

    Add :framework.one/config Add … (compare)

Sean Corfield
@seancorfield
And it will also have looked for a controller for each missing section.
Nando
@dnando
So the convenience of convention has a cost ...
Sean Corfield
@seancorfield
Yup, a cost that most people don’t think about.
I look at all the errors reported by our ColdBox apps and I see all sorts of phishing going on with bizarre URLs being requested… and they all plough through layers of ColdBox error handling (no matching handler — since it requires a handler exist for every request — so at least it avoid looking for views and layouts).
If FW/1 required a controller for every request, it could auto-load them at startup and then avoid looking for views for requests where the section didn’t match a controller.
Nando
@dnando
Yes, I see similar in my logs, so I understand your reasoning
Sean Corfield
@seancorfield
Of course you could still take a known valid URL and just randomize the item portion of it :) Both FW/1 and ColdBox would tank under that :)
The README has been updated with commentary on the pros and cons.
We’ve already refactored two applications at work to no longer use FW/1. I’m starting on the third (and final) one today.
Sean Corfield
@seancorfield
One of the potentially big benefits for us is maintainability — new Clojure developers will know Ring etc and be able to jump straight in without needing to learn some "weird" third party framework.
Part of our big drive to convert these apps from CFML to Clojure in the first place was maintainability for the future, since we’re committed to hiring Clojure developers in future, not CFML developers.
In addition, converting from CFML to Clojure produced much faster applications (at least where the requests were not IO-bound), and ripping FW/1 out of those now has made them faster still.
Nando
@dnando
That’s quite a journey you’ve taken … :-)
Sean Corfield
@seancorfield
Our OAuth2 Authorization Server now responds in about 15ms (and most of our REST API calls are around 10ms with a few heavy ones around 40ms).
Nando
@dnando
I’m finishing up a huge FW/1 app I’ve been working on for the last 7 years in the next month or so, if all goes to plan.
Not sure what’s next, but I want to start building some simple Clojure apps.
Sean Corfield
@seancorfield
Views / Layouts 523 cfms 47235 total loc
ColdBox Controllers 80 CFCs 18355 total loc
FW/1 Controllers 30 CFCs 3949 total loc
Model 119 CFCs 19532 total loc
Unit Tests 57 CFCs 5347 total loc
Clojure build/config 13 files 1409 total loc
Clojure source 184 files 37190 total loc,
    2556 fns, 681 of which are private,
    333 vars, 16 macros, 35 atoms
Clojure tests 119 files 11948 total loc
That’s our total code base.
The Model CFCs section used to be well over 30K and the ColdBox Controllers section was close to 30K as I recall.
Nearly all of the FW/1 code will go away in January and over the next year much of the Model CFCs and a lot of the ColdBox Controllers and Views / Layouts will also go away. Replaced by the REST API server we’ve built in Clojure and a React.js front end.
I am looking forward to deleting all that code!
Nando
@dnando
I’ll give you access to my codebase and you can delete that too!
Problem solved :-)
I have to go to bed … thanks for the chat Sean.
Sean Corfield
@seancorfield
Any time! Always a pleasure chatting with you @dnando !
Sean Corfield
@seancorfield
As of today, we have eliminated FW/1 for Clojure completely from our standalone Clojure web apps. So that’s three apps (two small, one medium) converted in about three days...
Nando
@dnando
@seancorfield I seem to remember you that you said someplace that you use hugsql. Is that correct?
Sean Corfield
@seancorfield
HoneySQL — a DSL for SQL — on top of clojure.java.jdbc
Plenty of folks seem to like HugSQL tho’… I’ve never tried it.
Nando
@dnando
Ok, thanks.
Sean Corfield
@seancorfield
I’ve spent a fair bit of today refactoring our code base to avoid Engine (another one of my somewhat misguided thought experiments in Clojure) :)
(I’d be shocked if anyone but me has ever used Engine!)
Nando
@dnando
Sean, it may be seen as somewhat of a disappointment that development of fw1-clj has been discontinued, but I’m actually encouraged. Sounds strange, but it’s a strong affirmation that using composable libraries is the way forward in Clojure.
Sean Corfield
@seancorfield
I’m not disappointed — it was an interesting learning experience, like Engine has been, to reach a better understanding of the Clojure ecosystem.
By porting FW/1 to Clojure, I’ve learned more about Ring and Compojure, and now I have a much better grasp of how web applications can work — elegantly — in Clojure.
Similarly, Engine has taught me a lot about separation of concerns and the reality of what abstractions work and what don’t, as well as monadic code :)
Sean Corfield
@seancorfield
Mwahahaha... Ring for CFML is feasible... https://github.com/seancorfield/ring-cfml ...does the CFML world need another framework? :)
Sean Corfield
@seancorfield
https://github.com/seancorfield/ring-cfml now has a license, a proper readme, some examples and it actually works in a basic kind of way.
Nando
@dnando
What value would Ring for CFML bring to the table, in your opinion? If any ...
Sean Corfield
@seancorfield
Good question. Hard to say, beyond "it’s another framework" and it’s an interesting way to learn Functional Programming, since it’s all about composition of functions.
It is extremely extensible — everything is either a handler or middleware, both of which are "just functions". In the Clojure world it is the basis of pretty much every other web library and even several other web frameworks (as much as Clojure even has frameworks).
Nando
@dnando
So it would be the next step in a continuum from ColdBox to FW/1 to RingCFML it seems. I’m still fully immersed in the CFML world, as I have a project to finish. Since I’ve been dabbling in Clojure, I’m trying my best to compose solutions from multiple service functions that isolate functionality, of course, at a relatively granular level, isolate stuff that has the potential to be refactored, and now I’m thinking about how I might isolate state change to to try and maximize the number of pure functions I write. It seems to me this is the best quality work I’ve ever produced, but there is still a LOT of room for improvement. I only have a fuzzy grasp of all of this in practice, and I honestly think, or at least hope, functional programming might click better in to place when I have the space and time to work in Clojure.
Sean Corfield
@seancorfield
It takes a lot of practice to get into the "mostly pure functions" way of thinking.
Nando
@dnando
Well, that’s reassuring … :-)
I can say that at least I see the problem in the code I’m writing now with impure functions, and I’m trying …
Sean Corfield
@seancorfield
:+1:
Nando
@dnando
So I just refactored some code in a functional style, turning one function into 3, one pure and 2 side effecting, and there is something about this that just makes me happy, from muddy confusing to crystal clear kind of happy.
Sean Corfield
@seancorfield
Nice! Yeah, it’s a rewarding process, pushing side effects out to the edge of your application code, and making it easier to test the core logic.
Nando
@dnando
It is really surprising how much easier it is to reason about complex code when it is refactored into pure and side effecting functions. There is something deeply ingrained about side effects being the goal of a process, the point of the arrow so to speak, that is seems natural to tangle them up with the bow and quiver that drives the side effect. I’m reminded of Rich Hickey’s “Simple Made Easy” talk, thinking “wow, maybe this is what he was talking about!"
Sean Corfield
@seancorfield
Pure functions compose easily (and can be run concurrently, as long as the data flow requirements are satisfied). Side effecting functions tend to fail both of those.