Skip to main content

Stats per Model/View

Summary

Track detailed statistics for every Admin View, Site View, and Custom Admin View in your component โ€” including field count, file output, compiled line totals, and blueprint dependencies โ€” giving you insight into component complexity and maintenance scope.

๐Ÿ” What It Tracks

For each view (Admin, Site, or Custom Admin), JCB logs:

  • ๐Ÿงฉ View type (Admin, Site, Custom Admin)
  • ๐Ÿงฎ Total number of assigned fields
  • ๐Ÿ—‚๏ธ Number of files generated during compile (PHP, XML, INI, etc.)
  • ๐Ÿ“ Total line count output from compiled files
  • ๐Ÿ“Ž Linked blueprints (e.g., templates, layouts, snippets)
  • ๐Ÿ“Š Presence of dynamic GETs or external data joins
  • ๐Ÿ” ACL, routing, and controller flags (where applicable)

๐Ÿ’ก Why It Matters

This per-view telemetry lets you:

  • Identify which views are growing most in complexity
  • Spot underutilized or bloated structures
  • Track blueprint-to-output ratio (design vs. compile weight)
  • Prioritize optimization or documentation efforts

๐Ÿ›  How to Access

  • During compilation, JCB logs stats per entity in the build report
  • Viewable in the final compiler summary
  • Exported in metadata (JSON) if enabled
  • CLI output includes stats when compiling with --verbose or --log options

๐Ÿ“˜ Example Use Cases

  • Analyze if a Site View has too many fields for frontend rendering
  • See which Admin View produces the most code (and may need refactoring)
  • Ensure that each Custom Admin View has expected layout or data logic
  • Generate internal docs that show โ€œwhich view does whatโ€

โœ… Benefits

  • Transparent component architecture visibility
  • Improved decision-making around refactor, testing, or training
  • Data-backed insight for project contributors or auditors

Conclusion

Stats per Model/View transform JCB from a visual builder into a measurable dev platform. By surfacing granular data per view, you gain actionable insight into structure, complexity, and growth โ€” helping you stay in control as your component evolves.