{"id":22008845,"url":"https://github.com/webfirmframework/wff","last_synced_at":"2025-05-06T16:28:36.935Z","repository":{"id":37724526,"uuid":"46187719","full_name":"webfirmframework/wff","owner":"webfirmframework","description":"Java framework to develop web applications","archived":false,"fork":false,"pushed_at":"2025-05-05T12:20:21.000Z","size":16198,"stargazers_count":13,"open_issues_count":1,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-05T13:35:34.963Z","etag":null,"topics":["ai","artificial-intelligence","css3","html5","java","java-framework","mltp","web-framework","webfirmframework","websocket","wff","wff-binary-message","wffweb"],"latest_commit_sha":null,"homepage":"https://webfirmframework.com","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/webfirmframework.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2015-11-14T18:56:22.000Z","updated_at":"2025-03-14T04:00:06.000Z","dependencies_parsed_at":"2024-08-10T09:23:18.811Z","dependency_job_id":"1e5481de-d7ad-4e4b-a5e8-b19f3c733a7b","html_url":"https://github.com/webfirmframework/wff","commit_stats":null,"previous_names":[],"tags_count":81,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webfirmframework%2Fwff","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webfirmframework%2Fwff/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webfirmframework%2Fwff/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webfirmframework%2Fwff/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/webfirmframework","download_url":"https://codeload.github.com/webfirmframework/wff/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252721060,"owners_count":21793746,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","artificial-intelligence","css3","html5","java","java-framework","mltp","web-framework","webfirmframework","websocket","wff","wff-binary-message","wffweb"],"created_at":"2024-11-30T02:07:32.516Z","updated_at":"2025-05-06T16:28:36.928Z","avatar_url":"https://github.com/webfirmframework.png","language":"Java","funding_links":[],"categories":["开发框架"],"sub_categories":["Web框架"],"readme":"[![Build Status](https://img.shields.io/badge/build-passing-greensvg?style=flat)](https://app.circleci.com/pipelines/github/webfirmframework/wff?branch=master\u0026filter=all)\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/410601e16dc54b0a973c03845ad790c2)](https://www.codacy.com/app/webfirm-framework/wff?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=webfirmframework/wff\u0026amp;utm_campaign=Badge_Grade)\n[![Stackoverflow](https://img.shields.io/badge/stackoverflow-wffweb-orange.svg)](https://stackoverflow.com/questions/tagged/wffweb)\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.webfirmframework/wffweb/badge.svg)](https://search.maven.org/#artifactdetails%7Ccom.webfirmframework%7Cwffweb%7C12.0.4%7Cjar)\n[![javadoc](https://javadoc.io/badge2/com.webfirmframework/wffweb/javadoc.svg)](https://javadoc.io/doc/com.webfirmframework/wffweb)\n[![GitHub license](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg?style=flat)](https://www.apache.org/licenses/LICENSE-2.0)\n\n\n# wffweb\nwffweb is one of the modules of webfirmframework. It's an open source java framework for real time application development which can generate html5 and css3 from java code, [read more...](https://webfirmframework.github.io/)\n\n\n#### [Register in wff hub for template reference and more!](http://hub.webfirmframework.com). It's built by wffweb-12.x.x\n#### [check out main features of wffweb](https://www.youtube.com/watch?v=UWoNliHOy6A)\n##### [check out wffweb sample projects](https://github.com/webfirmframework/minimal-production-ready-projects)\n\n\n##### check out [this sample project](https://github.com/webfirmframework/wffweb-demo-deployment)\n\n\n(For the survival of this framework, some ads are shown in [webfirmframework.github.io](https://webfirmframework.github.io) and [webfirmframework.com](https://webfirmframework.com) web sites. These are temporary ads and will be removed soon. We are really sorry if it causes any inconvenience to your reading.)   \n\nHere are some sample codes\n\n##### Sample1 :-\nSince 3.0.9 or later you can use functional style coding as follows. This is the recommended coding style vs anonymous coding style.\n~~~\nHtml rootTag = new Html(null).give(html -\u003e {\n       \t \n    new Head(html);\n       \t \n    new Body(html).give(body -\u003e {           \t \n        new NoTag(body, \"Hello World\");           \t \n    });\n       \t \n});\n// prepends the doc type \u003c!DOCTYPE html\u003e\nrootTag.setPrependDocType(true);\nSystem.out.println(rootTag.toHtmlString(true)); \n~~~\n\nor the same in few lines\n\n~~~\nHtml html = new Html(null);\nnew Head(html);\nBody body = new Body(html);\nnew NoTag(body, \"Hello World\");\n\n\n// prepends the doc type \u003c!DOCTYPE html\u003e\nhtml.setPrependDocType(true);\nSystem.out.println(html.toHtmlString(true)); \n~~~\n\nprints the following output\n~~~\n\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n\u003chead\u003e\n\u003c/head\u003e\n\u003cbody\u003e\nHello World\n\u003c/body\u003e\n\u003c/html\u003e\n~~~\n\n##### Sample2 :-\n~~~\nDiv div = new Div(null); \nSystem.out.println(div.toHtmlString()); \n~~~\nprints :- \n~~~\n\u003cdiv\u003e\u003c/div\u003e\n~~~\n\n##### Sample3 :-\n~~~\nDiv rootTag = new Div(body).give(div -\u003e {\n    new Div(div);\n    new Div(div);\n});\nSystem.out.println(rootTag.toHtmlString()); \n~~~\nprints :- \n~~~\n\u003cdiv\u003e\n\u003cdiv\u003e\n\u003c/div\u003e\n\u003cdiv\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n~~~\n##### Sample4 :-\n~~~\nDiv div = new Div(null, new Width(50, CssLengthUnit.PX));\nSystem.out.println(div.toHtmlString()); \n~~~\nprints :- \n~~~\n\u003cdiv width=\"50px\"\u003e\u003c/div\u003e\n~~~\n\n##### Sample5 :-\n~~~\nDiv div = new Div(null, new Style(new BackgroundColor(\"green\")));\nSystem.out.println(div.toHtmlString()); \n~~~\nprints :- \n~~~\n\u003cdiv style=\"background-color: green;\"\u003e\u003c/div\u003e\n~~~\n\n##### Sample6 :-\n```\nfinal Style paragraphStyle = new Style(\"color:red\");\nHtml rootTag = new Html(null, new CustomAttribute(\"some\", \"val\"),\n        new Id(\"htmlId\"), new Style(\"background:white;width:15px\"))\n                .give(html -\u003e {\n\n                    new Div(html, new Id(\"outerDivId\")).give(div -\u003e {\n\n                        int[] paragraphCount = { 0 };\n\n                        new Div(div).give(div2 -\u003e {\n\n                            new H1(div2).give(h -\u003e {\n                                new NoTag(h, \"Web Firm Framework\");\n                            });\n\n                            for (paragraphCount[0] = 1; paragraphCount[0] \u003c 4; paragraphCount[0]++) {\n                                new P(div2, paragraphStyle).give(p -\u003e {\n                                    new NoTag(p,\n                                            \"Web Firm Framework Paragraph \"\n                                                    + paragraphCount);\n                                });\n                            }\n\n                        });\n                    });\n\n                    new Div(html, new Hidden());\n                });\n\nparagraphStyle.addCssProperty(AlignContent.CENTER);\n\nSystem.out.println(rootTag.toHtmlString(true));\n\n```\nprints\n\n```\n\u003chtml some=\"val\" id=\"htmlId\" style=\"background:white;width:15px;\"\u003e\n\u003cdiv id=\"outerDivId\"\u003e\n    \u003cdiv\u003e\n        \u003ch1\u003eWeb Firm Framework\u003c/h1\u003e\n        \u003cp style=\"color:red;align-content:center;\"\u003eWeb Firm Framework Paragraph 1\u003c/p\u003e\n        \u003cp style=\"color:red;align-content:center;\"\u003eWeb Firm Framework Paragraph 2\u003c/p\u003e\n        \u003cp style=\"color:red;align-content:center;\"\u003eWeb Firm Framework Paragraph 3\u003c/p\u003e\n    \u003c/div\u003e\n\u003c/div\u003e\n\u003cdiv hidden\u003e\u003c/div\u003e\n\u003c/html\u003e\n```\nand we can add/change styles later, eg:-\n```\nparagraphStyle.addCssProperties(new WidthCss(100, CssLengthUnit.PER));\n\nColor color = (Color) paragraphStyle\n        .getCssProperty(CssNameConstants.COLOR);\n        \ncolor.setCssValue(CssColorName.BROWN.getColorName());\n\nSystem.out.println(html.toHtmlString(true));\n\n```\nIt will add width 100% in aboutParagraph and will change color to brown, its generated html code will be as follows\n\n```\n\u003chtml some=\"val\" id=\"htmlId\" style=\"background:white;width:15px;\"\u003e\n\u003cdiv id=\"outerDivId\"\u003e\n    \u003cdiv\u003e\n        \u003ch1\u003eWeb Firm Framework\u003c/h1\u003e\n        \u003cp style=\"color:brown;align-content:center;width:100.0%;\"\u003eWeb Firm Framework Paragraph 1\u003c/p\u003e\n        \u003cp style=\"color:brown;align-content:center;width:100.0%;\"\u003eWeb Firm Framework Paragraph 2\u003c/p\u003e\n        \u003cp style=\"color:brown;align-content:center;width:100.0%;\"\u003eWeb Firm Framework Paragraph 3\u003c/p\u003e\n    \u003c/div\u003e\n\u003c/div\u003e\n\u003cdiv hidden\u003e\u003c/div\u003e\n\u003c/html\u003e\n```\n\n\n##### Checkout \n\n[Refer Developers Guide to get started](https://webfirmframework.github.io/developers-guide-wffweb-3/get-started.html)\n\n[How to resolve wffweb dependency in build tools like maven, ivy, Scala SBT, Leiningen, Grape, Gradle Grails or Apache Buildr](https://webfirmframework.github.io/developers-guide-wffweb-3/how-to-resolve-dependency-in-build-tools.html)\n\n[wffweb released versions](https://webfirmframework.github.io/developers-guide-wffweb-3/wffweb-released-versions.html)\n\n[You can request features or report bugs here](https://github.com/webfirmframework/wff/issues)\n\nFeel free to write us @ tech-support@webfirmframework.com for any assistance.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebfirmframework%2Fwff","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebfirmframework%2Fwff","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebfirmframework%2Fwff/lists"}