2

I have used Bootstrap while development of Web Application. Now I have started learning of BootsFaces. While learning very first question pop up in my mind is

What is Exactly difference between Bootstrap and BootsFaces? and what are their pros and cons over each other?

I searched for these answers but there wasn't any answer which make my doubt clear. Please help me for these questions.

Stephan Rauh
  • 3,069
  • 2
  • 18
  • 37

1 Answers1

6

BootsFaces is a JSF component library which generates HTML that uses Bootstrap. BootsFaces allows you to easily work with Bootstrap in a JSF application. Comparing them would be more or less the same as comparing red paint to a red painted board.

Some info from the BootsFaces showcase on this subject, specifically on layouting:

Why BootsFaces? Why not using Bootstrap natively?

BootsFaces takes full advantage of Bootstrap's Grid system while maintaining the benefits of being a JSF framework. Actually, we believe it's more concise and more expressive than programming Bootstrap natively. Convince yourself: inspect the source code of the demo in your browser's source code view. After reformatting, the form is 81 lines. The JSF source is is 45 lines.

BootsFaces being a JSF framework means that you can leverage Bootstrap's layout feature using - for example - the JSF templating system and JSF's conditional rendering to achieve and maintain very complex layouts without much effort.

This website is an example itself: it uses a page template with ui:insert and ui:include and the pages are ui:compositions.

See also:

Jasper de Vries
  • 19,370
  • 6
  • 64
  • 102
  • 2
    The question is tagged "bootstrap-4", so I'd like to add that the BootsFaces 1.x is built on the older version Bootstrap 3. The yet-to-be-release version BootsFaces 2.x is built on Bootstrap 4. – Stephan Rauh Aug 24 '18 at 21:22