[ckan-dev] CKAN and JavaScript
Friedrich Lindenberg
friedrich.lindenberg at okfn.org
Tue May 29 16:14:51 UTC 2012
Hey guys,
I think you may be missing an opportunity here. Let me be clear: I
hate JavaScript as much as the next person (or a little bit more). But
having a good, fully JS-based CKAN frontend would help with many
issues: perceived performance, CMS integration, theming and even
running satellite sites like offenedaten.de or data sites for NGOs and
local governments. I don't think accessibility is incompatible with JS
these days, but SEO may be a concern - so this needs to be designed.
What is really great about it, though, is code reduction: in OS, we've
been moving more and more stuff into JS, and now many of the
controllers are essentially becoming dumb template renderers. I know
that when I worked on it, CKAN had massive consistency issues between
the controllers and the API. And while I'm sure some of that has been
addressed by the logic layer, maybe this would still help simplify the
app.
Cheers,
- Friedrich
On Tue, May 29, 2012 at 5:00 PM, Toby Dacre <toby.okfn at gmail.com> wrote:
>
>
> On 29 May 2012 15:44, Aron Carroll <aron.carroll at okfn.org> wrote:
>>
>> Hi all,
>>
>> I've been asked to summarise the general approach to using JavaScript on
>> CKAN
>> moving forward.
>>
>> As CKAN is a website designed to enable users to find and explore datasets
>> and can be deployed in a wide variety of environments it's very important
>> that
>> the site is usable by as broad an audience as possible.
>>
>> So all key features of the site should be implemented and work without
>> JavaScript. This provides the following benefits.
>>
>> * The site content is indexable and searchable via search engines like
>> Google.
>> * Content is accessible to screen readers and other assistive technology.
>> * The site functions for users without JavaScript enabled, while the
>> scripts load or
>> if an error occurs breaking the app.
>> * Keeping JavaScript to a minimum reduces load times and keeps page weight
>> down.
>>
>> It also keeps majority of the application in Python which is the primary
>> language
>> of the CKAN team and reduces the maintenance cost of having large portions
>> of
>> application logic in two places.
>>
>> This means adding using HTML forms that submit to CKAN rather than
>> directly to
>> the API. Providing error messages in the HTML source and ensuring all
>> content
>> is included in the html source on page load. JavaScript can then be used
>> to make
>> features richer and enhance the experience.
>>
>> Some features such as the data previewer are going to require JavaScript.
>> Others
>> are more complicated, for example the search facets. Ideally these would
>> provide
>> the same functionality with or without JavaScript but there is an argument
>> that
>> they provide auxiliary functionality as long as the basic form works on
>> it's own.
>> These should be evaluated and discussed on a feature by feature basis.
>>
>
> Thanks aron looks good. Maybe this should be commentary for the javascript
> coding standards
>
>>
>> Cheers,
>> Aron
>> _______________________________________________
>> ckan-dev mailing list
>> ckan-dev at lists.okfn.org
>> http://lists.okfn.org/mailman/listinfo/ckan-dev
>
>
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/ckan-dev
>
More information about the ckan-dev
mailing list