Hello,
So I found some methods that I was able to employ in my template development that would allow me to run the template code locally within Visual Studio (VS) directly. This sort of changes the game because it makes it possible to use the VS debugger to determine where the errors are, and also to step through the code and create breakpoints for variable inspections, etc...
The trick was getting the model object out of Tessitura. Once I figured that out, then it was just a matter of passing that to the MVC view in VS and letting it render.. With that I created a simple project in VS through which I can add my own templates and run them through the debugger there.
Anyhow, you can find the project here: https://bitbucket.org/TN_WebShare/template-debugger/src/master/ . I provided a somewhat verbose readme with the project code so hopefully you can get it working for you without a whole lot of VS or MVC knowledge.
I have tested it with the stock templates, as well as my own templates and they are all working without any problems..
Having these templates run locally within VS is a wonderful thing, and I think this will save a lot of folks a lot of time in their template development.
.... Please try it out and let me know if you are having trouble working with it, I would be happy to update the README with further instructions.
Loving your work Howard - I'll be looking into this soon - our templates are very ugly and need a lot work. Hoping to tackle this issue soon so I'll touch base when I do.
Well Thank you very much ;)
I am always eager to assist anyone that needs help with programming or SQL or anything.. Feel free to get in touch with me whenever you need to...
Just to echo the comment from Louise; this is an excellent, valuable piece of work, Howard.
I've finally found the time to install and setup. The ReadMe files is super-helpful for noobs like me so that really hit the spot and I got it running in a couple of hours.
Debugging in VS is so much faster and easier and will save so much time and frustration.
Thanks again for creating and sharing this it's much appreciated. You deserve a medal.
Jamie
Thank you for your support ;)
You might also want to check out the template wrapper project found here: https://bitbucket.org/TN_WebShare/template-wrapper/src/master/
I built this before I knew how to get the template to run directly out of visual studio, so this is what I was using prior to this project to get my template code written in a more convenient way. Even though there is some functionality overlap between the template wrapper and this visual studio template debugger project, there are still a few things it does that makes it more convenient to develop templates, so I recommend to folks to get both of these working, if you are going to be doing some HTML template development for Tessitura.
The template wrapper is more of a full fledged desktop application that also lets you render HTML templates on your desktop. This one is self-contained (you do not need visual studio to run it) and has functionality built in to move template code to/from Tessitura. It also has a super-useful "model browser" built into it, so you can navigate the model object and see its values in a tree-view control.
You can use it in conjunction with the visual studio template debugger. You can reference the same template source file you are modifying in visual studio if you like. There is this "auto run" feature which will run the template every time the source file is saved to file, so you do not even need to tell it to run to see your changes..
Reference the Wiki for more details: https://bitbucket.org/TN_WebShare/template-wrapper/wiki/Home
Also, for those that do not have, or do not want to bother with visual studio to compile the application from source, I have pre-compiled binaries you can download if you like. You can find that here: https://drive.google.com/drive/u/0/folders/1hE5jRthF9omvMqy7AIautZj-8p_3TfM3
Hope this all helps ;)
... Howard
I cannot access Bitbucket. Have registered and confirmed my account. Did anyone else had this problem?
Hi Vilius,
Once you have your Bitbucket account, you can be given permissions to access the repository by completing the form here.
This will give you access to the Developer slack channel, as well as Bitbucket.
Thanks,
Chris Szalaj
Product Owner, Business Facing Products
Tessitura Network