27 December 2016

this is why I don't like prime* frameworks

Primefaces is a heavyweight framework, I don't prefer to use it on my next project.

However, as angular js is promising, I looked into primeng: http://www.primefaces.org/primeng/  hopefully to find it more lightweight than its parent/sibling; primefaces.

But I think still it is heavyweight framework that had to generate too much HTML to get simple staff done, here's the example HTML generated code for bootstrap PRIMARY button:
<button label="Primary" pbutton="" type="text" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only">
<span class="ui-button-text ui-c">Primary</span>
</button>
What's the heck, why button of type text that have an internal span, and none of them bootstrap classes so I can easily customize easily later, but instead prime specific classes (I think same as primefaces classes)

Also, the autocomplete component:
<p-autocomplete field="name" placeholder="Countries" class="ng-valid ng-touched ng-dirty">
 <span class="ui-autocomplete ui-widget">
  <!--template bindings={}--><input autocomplete="off" pinputtext="" type="text" class="ui-autocomplete-input ui-inputtext ui-corner-all ui-state-default ui-widget" placeholder="Countries" size="30"><!--template bindings={}--><!--template bindings={}-->
  <div class="ui-autocomplete-panel ui-widget-content ui-corner-all ui-shadow" style="display: none; width: 100%; max-height: 200px; z-index: 1001; opacity: 1.055; top: 28px; left: 0px;">
   <ul class="ui-autocomplete-items ui-autocomplete-list ui-widget-content ui-widget ui-corner-all ui-helper-reset">
    <!--template bindings={}-->
   </ul>
  </div>
 </span>
</p-autocomplete>
Why? here's the corresponding generated code of ng2-bootstrap: http://valor-software.com/ng2-bootstrap/#/dropdowns:

<input class="form-control ng-valid ng-dirty ng-touched">
Yes, that's it.
I think I will not consider any prime* products unless this huge html code stop being generated!

No comments: