Taking over a legacy Haskell app as a junior developer
https://slides.com/emhoracek/haskell/live
1. A project
2. How we did it
3. Challenges
4. Strategies that helped
WordPress with Haskell app embedded in iFrames
Haskell app
WordPress
Haskell app
Haskell app serves content from WordPress API
Haskell app
WordPress
https://slides.com/emhoracek/haskell/live
"acf": {
"internal_memo": "",
"sections": [
{
"acf_fc_layout": "standard",
"title": "(section title)",
"featured_media": false,
"section": [
{
"content": "(section content)"
}
]
}
],
"paywall": false,
"toc": false,
"subhead": "(subhead)",
"antescript": "",
"postscript": "",
"footnotes": ""
/* and many more */
}
<wpPostByPermalink>
<apply template="_post">
<wpMultisection>
<wpSections>
<wpSection>
<section class="po-cn__section po-wp__section" id="ch-${wpSectionsIndex}">
<if exists="${wpTitle}">
<then><h1 class="po-cn__subhead po-wp__subhead"><wpTitle/></h1></then>
<else><hr class="po-cn__rule po-wp__rule"/></else>
</if>
<wpContent/>
</section>
</wpSection>
</wpSections>
</wpMultisection>
</apply>
</wpPostByPermalink>
multiSectionFields :: Field Ctxt
multiSectionFields = CN "multisection"
["acf"]
[ M "sections"
[ F "title"
, M "section"
[ F "content" ] ] ]
https://slides.com/emhoracek/haskell/live
Me: "How have your teams handled stuff like this?"
David: "The templating languages are more flexible than Larceny, and the frameworks make it easier to expose more data."
Me: "Oh. We can do that."
David: "We can?!"
We write wpCustom, which allows Remeike to query any endpoint he wants and use any JSON from the response!
A few weeks later,
a wpCustom template
crashes the entire site.
https://slides.com/emhoracek/haskell/live
According to my research the fence was built as an art project and abandoned in 1932!
THERE WAS A RAMPAGING BULL BEHIND THE FENCE
idk what if it's important?????
who knows????
I'll research the historical owners of the surrounding property.
https://slides.com/emhoracek/haskell/live
https://slides.com/emhoracek/haskell/live
https://slides.com/emhoracek/haskell/live
Can't find a person with extensive production experience developing FP web applications? Try:
a person with knowledge of FP
plus
a person with experience in web applications
It works!