Thursday, May 20, 2010

Custom Programming in ActiveCampus

So, your school uses ActiveCampus? Perhaps your school needs to list a staff directory and you want to be able to have it updated automagically instead of hand updating a content type for each user as they come and go with their employment. Well I'm hear to say that it appears to be fairly straight forward process. You can even embed the component into the CMS and your templates. Unfortunately, I haven't found a way to make it so that you can drop your custom program into a dropzone. Perhaps I'll get that figured out as well? I don't know if it's possible, but Test servers are meant to be borked and re-imaged right?!

ActiveCampus is developed in ASP.NET, so therefore, I created my app in ASP.NET as well. For my personal preference I am using C#. I created a new Web Application in Visual Studio. For my first run through, I created a test control that is basically Hello World. I created my control, and compiled the code to create an ASP.NET Assembly. I then copied the assembly into the bin directory of both the console and the public site. For my instance, I named my assembly myschool_CustomProgramming.dll.

Next up copied the code on the ASCX control into a new template under Website->Templates. I put it in a new folder called customControls. I then edited a Template to reference and use this control.

The result is that i get a functioning template that I can still add items to the drop zone in, and yet still have the capability to have my custom programming. I created a page using this template, and the result was a functioning page that uses both the ActiveCampus processes and my own assembly as well.

On a side note, I highly suggest that you put all of your custom programming into a safe and unique class structure to ensure that you cannot interfere with their programming. In my case, I just used myschool_CustomProgramming.

Right now, I'm working on building our Staff Directory and online email form so that it is embedded directly into our site.

Please note that most likely anytime you upgrade the system, you will probably need to re-add your custom components. I will be testing that in the near future when I update our test environment to the latest version from Datatel. In any case, this method allows your code to run independently of their programming. If you wished, you may be able to bring in their components and link to some of their classes, but I haven't gone down that road yet. (Might be useful for database connectivity). In the meantime, I'm just using my own custom components for accessing the database, using the same connection methodology that they have setup.

So far this is just a proof of concept. Hopefully by mid-June I'll have something in production to show everyone.

Paul

No comments: