Wednesday, 28 September 2016

What is a TACTIC Widget?



Widgets are self-contained user interface elements.  In TACTIC, they combine HTML layout and CSS styling with server-side Python processing, client side Javascript behaviors, all encapsulated in a single entity called a widget.


Widgets are a fundamental building block to interfaces in TACTIC. Even the base HTML tags have been mapped to TACTIC Widgets, however, most users will create and combine higher level widgets using pure python classes or, more commonly, they can be created using the TACTIC Custom Layout Editor.


The custom layout editor enables the creation of widgets directly within the TACTIC interface. Very complex enterprise applications can be created using solely this editor without needing to resort to Python class (however, that is always an option, if desired)


There are 5 main components to a TACTIC Widget:

  1. Keyword Arguments
  2. HTML
  3. Styles
  4. Behaviors
  5. Python


Each of these components make up the definition of single widget.  They are form a single interface element. The simplest widget is a pure html element.


<div>Hello</div>


In order to style this element, CSS can be attached to this element.   Because this is HTML, you can add CSS styles directly on the element itself:


<div style=”color: #F00”>Hello</div>


A better method is to separate out the styling of the widget from the structure.   Although, an “id” could be used to relate CSS to this element, it is generally not recommended.  This is because “id” must be unique throughout the entire document.  With widgets as reusable elements that can appear many times in a single interface, it is better to identify an element using “class”.


<div class=”element1”>


And in the styles tab of the Custom Layout Editor, you would add:


.element1 {
   color: #F00;
}


TACTIC Widgets also bind server side processing into the widget.  The python component has a predefined kwargs variable that contains input arguments to the widget.  Thus in the python tab, you could write:


color = kwargs.get(“color”)


And you could use this variable in both the HTML tab and the styles tab.  For example:


.example1 {
   color: ${color};
}


This becomes a configurable widget that can be embedded into another widget using the HTML as follows:


<div>
 <h1>Reference to another widget</h1>
 <element view=”content1” color=”#0B0”/>
</div>


The  would embed the word “Hello” with blue text into this widget.


Finally, you can access the kwargs variable in javascript in the behaviors tab from the implicit bvr variable:


<behavior class=”.element1” event=”click”>
   var color = bvr.kwargs.color;
    alert(color)
</behavior>


Using these together, you can build up more complex reusable widgets.


There are a number of significant advantages of using TACTIC for content delivery, despite the many web platforms out there and many that do a good job of delivering web content.  For those more comfortable with these other platforms, there is a TACTIC javascript standalone API which can be imported into any web framework.  


TACTIC widgets have a very strong encapsulation between the client side code and the server side code.  Data structures are seamless transferred and shared between the two. TACTIC widgets can be loaded asynchronously and do not rely on full page refresh to load content.  This makes TACTIC apps feel smoother because they only update parts of the interface that need updating.  TACTIC also has many built-in widgets that do common widgets that together provide a wide range of tools to handle many enterprise requirements, especially when creating data driven workflow solutions.




23 comments:

  1. Thanks for giving me your time to share this article here about widget in Your article is very attractive and I am affected by the details that you have shared in this post. oracle fusion manufacturing certification in hyderabad

    ReplyDelete
  2. I was very happy to find this site. I really enjoyed reading this article today and think it might be one of the best articles I have read so far. I wanted to thank you for this excellent reading !! I really enjoy every part and have bookmarked you to see the new things you post. Well done for this excellent article. Please keep this work of the same quality.
    Data Science Course in Bangalore

    ReplyDelete
  3. I need to thank you for this very good read and i have bookmarked to check out new things from your post. Thank you very much for sharing such a useful article and will definitely saved and revisit your site.
    Data Science Course

    ReplyDelete
  4. Excellent Blog! I would like to thank you for the efforts you have made in writing this post. Gained lots of knowledge.
    Data Analytics Course

    ReplyDelete
  5. I bookmarked your website because this site contains valuable information. I am very satisfied with the quality and the presentation of the articles. Thank you so much for saving great things. I am very grateful for this site.

    Data Science Training in Bangalore

    ReplyDelete
  6. I have voiced some of the posts on your website now, and I really like your blogging style. I added it to my list of favorite blogging sites and will be back soon ...

    Digital Marketing Training in Bangalore

    ReplyDelete
  7. I found Habit to be a transparent site, a social hub that is a conglomerate of buyers and sellers willing to offer digital advice online at a decent cost.

    Artificial Intelligence Training in Bangalore

    ReplyDelete
  8. Truly incredible blog found to be very impressive due to which the learners who go through it will try to explore themselves with the content to develop the skills to an extreme level. Eventually, thanking the blogger to come up with such phenomenal content. Hope you arrive with similar content in the future as well.

    Machine Learning Course in Bangalore

    ReplyDelete
  9. I am sure it will help many people. Keep up the good work. It's very compelling and I enjoyed browsing the entire blog.
    Business Analytics Course in Bangalore

    ReplyDelete
  10. It is late to find this act. At least one should be familiar with the fact that such events exist. I agree with your blog and will come back to inspect it further in the future, so keep your performance going.

    Digital Marketing Training in Bangalore

    ReplyDelete
  11. Really nice and amazing post. I was looking for this kind of information, Keep posting. Thanks for sharing.
    Data Science Courses in Bangalore

    ReplyDelete
  12. When you contact Edumagnate for thesis proposal help, you can be confident that you will receive excellent proposal from us. It is our responsibility to satisfy you with great content. The thesis is not as straightforward as a typical writing job. It is a work based on a case study. A thesis plays a crucial function in defining the doctoral title for a dedicated scholar when obtaining their PhD. As a result, there should be no compromises in the quality of thesis writing. We can provide you with the best thesis help online within your budget. So, why are you waiting? Just come to us to enjoy the excellent thesis proposal from our thesis experts.

    ReplyDelete
  13. I must say, I thought this was a pretty interesting read when it comes to this topic.
    섯다

    ReplyDelete
  14. I wish more writers of this sort of substance would take the time you did to explore and compose so well. I am exceptionally awed with your vision and knowledge.
    스포츠토토

    ReplyDelete
  15. This is a wonderful article, Given so much info in it, These type of articles keeps the users interest in the website, and keep on sharing more … good luck This is a wonderful article, Given so much info in it, These type of articles keeps the users interest in the website, and keep on sharing more … good luck
    성인웹툰

    ReplyDelete
  16. Woah! I’m really digging the template/theme of this blog. It’s simple, yet effective. A lot of times it’s challenging to get that “perfect balance” between usability and visual appeal. I must say you’ve done a great job with this. Additionally, the blog loads extremely quick for me on Firefox. Outstanding Blog!
    토토사이트

    ReplyDelete
  17. You have shared a very informative article. I appreciate your technique and massive knowledge on this topic. I just want to thank you for taking the time to share your thoughts with us. Keep sharing more information about this article so I can gain more knowledge. Now it's time to get iphone screen repair baltimore/ for more information.

    ReplyDelete
  18. Everyone here to love your good work in this blog. It look you spend a lot of time or effort in this article. Thanks for sharing this article. Now it's time to avail EXFOLIATING SCRUB for more information.

    ReplyDelete
  19. It is a wonderful effort and as well a motivating blog article with amazing content; I loved the post, keep posting such interesting updates. Thanks so much for sharing. uniport basic studies admission requirements

    ReplyDelete
  20. Grab the top data science course online in the convenience of your own home. Flexible schedules, top-notch industry instructors, and painstakingly designed curriculum. Now available!data science course training in faridabad

    ReplyDelete

  21. I was impressed and really enjoyed reading this article to gain more knowledge. Thank you for sharing. Looking forward to new updates. lasuth postgraduate in echocardiography admission form portal

    ReplyDelete
  22. The insights shared in this post are valuable for anyone starting their journey in data science.data science course fees in hyderabad

    ReplyDelete