Is AMD going to be a requirement in later versions of elgg?

Hi, I am developing a website in elgg and I want to use the Dojo framework. That framework has it's own AMD loader which conflicts with the require.js that it is used by elgg. Still Dojo provides tools to use it with require.js and I did manage to do it with a lot of help from ewinslow. But still I think it adds complexity to the project and I believe I am going to miss some things that Dojo's own loader would provide (for example minification). Elgg provides many useful functions in core and I believe it would be silly to totally dismiss it's own javascript. 

In my project the whole presentation is going to be custom. I believe I will have to modify a lot of the plugins to fit my page, especially the javascript part. Elgg is a very nice framework for what it does and I can't use it like a simple CMS.

My question is: If I remove the require.js and use the Dojo loader instead, will I still have access to the core functions like in 1.8.x series? If yes will this behavior be supported in later versions (1.10.x, 2.x etc) or it will be a requirement to load the elgg javascript through require.js?

  • You can rip it all out if you want, you probably won't have access to the core js libs anymore though.  You will just have to make sure you load them yourself or change anything that depends on it - for example refreshing action tokens

     I can't use it like a simple CMS.

    If you want a simple CMS then elgg is not the solution for you.  There are real CMSs available that are designed to be just that.  If that's what you need then use drupal or wordpress.

    Seems like a whole lot of work, what are you really gaining from it?

    Going forward - likely not, each iteration we are moving more to require.js

  • >I believe I am going to miss some things that Dojo's own loader would provide (for example minification).

    RequireJS provides it's own minifier but really the problem with elgg is that it's not conducive to statically bundling the files like most tools expect you to be able to. This is not a require js problem. It's an Elgg issue.

    If you're writing your js in amd format, it shouldn't matter whether you use require js or dojo or whatever other loader. It's still the same standard format, so the loader is irrelevant.

  • @Matt Beckett:

    I don't want to use it as a CMS. The project is so custom that a simple CMS won't do. As to what I will gain, I hope knowledge, satisfaction and why not, some money. But, yes, it seems a lot of work and I already feel slumped by it. I hope I can achieve it at the end. 

    @Evan Winslow

    I am not very experienced. I learn as I go. From what I read around is that one cannot use the minified version of one framework with the loader of another. They are incompatible. 

    Anyway it seems very early in my project to think about such things, especially maybe because I haven't reached yet to the part where I will need this kind of fine tuning. I asked mostly because I wanted to do some forward planning.

    Thank you all for your answers.

Beginning Developers

Beginning Developers

This space is for newcomers, who wish to build a new plugin or to customize an existing one to their liking