{"id":18339792,"url":"https://github.com/theredhead/red.web","last_synced_at":"2025-04-06T05:32:18.707Z","repository":{"id":1859912,"uuid":"2784840","full_name":"theredhead/red.web","owner":"theredhead","description":"Event driven PHP framework with ASP.NET like \"templates\" and DataBinding","archived":false,"fork":false,"pushed_at":"2023-07-30T03:47:13.000Z","size":557,"stargazers_count":4,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2025-03-21T18:09:10.696Z","etag":null,"topics":["data-access","event-driven","php","server-side","template-engine"],"latest_commit_sha":null,"homepage":"http://www.private-void.com","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"chrisdickinson/beefy","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/theredhead.png","metadata":{"files":{"readme":"README","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2011-11-16T01:42:36.000Z","updated_at":"2023-07-30T03:47:55.000Z","dependencies_parsed_at":"2022-07-08T00:18:47.619Z","dependency_job_id":"ae97aea5-22a6-4333-9f08-51befcfdd366","html_url":"https://github.com/theredhead/red.web","commit_stats":{"total_commits":36,"total_committers":1,"mean_commits":36.0,"dds":0.0,"last_synced_commit":"4c69e81cc21d2cdff06767c78facfb4d8b36f1c1"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theredhead%2Fred.web","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theredhead%2Fred.web/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theredhead%2Fred.web/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theredhead%2Fred.web/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/theredhead","download_url":"https://codeload.github.com/theredhead/red.web/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247440594,"owners_count":20939223,"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":["data-access","event-driven","php","server-side","template-engine"],"created_at":"2024-11-05T20:19:24.850Z","updated_at":"2025-04-06T05:32:17.531Z","avatar_url":"https://github.com/theredhead.png","language":"PHP","readme":"README.\n=======\n\nThis document is set up as follows:\n\tLicensing information\n\tAbout the framework\n\tStyle Guidelines\n\t\tClasses\n\t\tMethods\n\t\tProperties and fields\n\tFuture goals\n\nLicensing information.\n======================\n\nThe source code to the framework is provided to you free of charge and you may\ndo with it as you see fit. This includes copying, altering, deploying, etc.\n\nBy using any of the code provided in any way, you accept full responsibility\nfor anything you do with it.\n\nCommercial support may be available in the future but the license will always\nremain open.\n\nThe original author reserves the right to switch out the license to a proper\nopensource license in the future.\n\nAbout the framework.\n====================\n\nHello and thanks for your interest in my little pet project!\na demonstration of this codes' demo project is available at:\n\thttp://www.private-void.com/\n\nThis framework is built from the ground up to provide a toolkit that meets\nthese requirements:\n\n- make the safer, faster, better way to do something the easiest way to do it.\n\t- make it easy to do data access with prepared statements that prevent\n\t  sql injection.\n\n- provide total localization and internationalization support\n\n- declarative programming where possible\n\t- make the no code way to handle user generated events a complete\n\t  no brainer by using easy to remember conventions\n\n- seperation of controller logic from view code\n\t- make it incredibly difficult to put controller logic in a view while\n\t  making it incredibly easy to do databinding to views\n\n- provide a very productive environment for producing highly specialized\n  solutions. you can still do kitchen sink stuff, but the real power is in the\n  expandability\n\t- standard form controls, including some fancy stuff with a solid base\n\t  that can be used to build entire applications in a single tag or just\n\t  allow you to build your own special type of button or textbox.\n\n- provide the core for a web based IDE for the web (my dream project)\n\t- build a web application where the application can be designed\n\t  using a point and click UI that lets the designer do mockups that the\n\t  programmer can just attach code to where needed\n\n- provide a standard way to \"compile\" all code and resources required for an\n  application into one file to make deploys pushbutton easy\n\n- high code quality standards\n\t- make it easy to assert that documentation is available on all key \n\t  elements of code during development (classes, properties, methods)\n\t- use modern, namespaced objec oriented code following clear guidelines\n\t  and taking cues from the some of the best ideas out there including\n\t  Apples' Cocoa and Microsofts System.Web.Forms (without getting into the\n\t  religious thing of who does what best, they are both pretty awesome in\n\t  their own way).\n\t- think global, act in local scope\n\n* note that when I say faster, I mean development time, not execution speed.\n\n\nStyle guidelines.\n=================\n\n1. Naming your entities.\n\tClasses\n\t\tAll class names are PascalCased (words contracted with each initial \n\t\tletter capitalised)\n\t\t\n\t\tNever shall the word 'public' be followed by whitespace and a dollar\n\t\tsign. (no public fields, ever. period.) this still applies if you\n\t\twant to put the word 'static' in between.\n\n\tMethods\n\t\tAll method names are camelCased (words are contracted with the first\n\t\tletter of each word capitalized, except the first word.)\n\t\t\n\t\tMethod parameters (argument names)\n\t\tParameters shall be camelCased and typehinted where possible.\n\t\tThey shall be mentioned in the methods' docblock using the @param\n\t\tannotation.\n\n\t\tMethods can contain variables, they too shall be named in camelCase.\n\t\tsince methods inside methods are by definition private API, no mention\n\t\tof them is required, nor wanted in a methods docblock, but you should\n\t\tget into the habit of declaring them.\n\t\t\n\t\tExample code:\n\nnamespace examples\n{\n\tuse \\DateTime;\n\tuse red\\Object;\n\n\t/**\n\t * Person represents a real-world person\n\t */\n\tclass Person extends Object;\n\t{\n\t\t/**\n\t\t * Holds this persons' birthdate\n\t\t *\n\t\t * @var DateTime\n\t\t */\n\t\tprivate $birthDate = null;\n\t\n\t\t/**\n\t\t * Get the number representing the years between this Persons' date of\n\t\t * birth and today.\n\t\t *\n\t\t * @return integer \n\t\t */\n\t\tpublic function getYearsOfAge()\n\t\t{\n\t\t\t// sanity check, require a birth date to be available\n\t\t\t$valid = assert($this-\u003egetBirthDate() instanceof DateTime);\n\t\t\t\n\t\t\t// set a default value\n\t\t\t$result = 0;\n\t\t\tif ($valid)\n\t\t\t{\n\t\t\t\t$now = new DateTime();\n\t\t\t\t$interval = $now-\u003ediff($this-\u003egetBirthDate(), true);\n\t\t\t\t$result = $interval-\u003ey\n\t\t\t}\n\t\t\t\n\t\t\t// more sanity checking\n\t\t\tassert($result \u003e -1);\n\t\t\treturn $result;\n\t\t}\n\n\t\t/**\n\t\t * Determine if this person is 18y or older\n\t\t *\n\t\t * @return boolean\n\t\t */\n\t\tpublic function isOverEighteen()\n\t\t{\n\t\t\treturn $this-\u003egetYearsOfAge() \u003e= 18;\n\t\t}\n\t}\n}\t\t\n#EOF\n\n\tThis sample code shows how to use docblock, naming convention for classes,\n\tmethods, fields and property accessors. It is not meant to be considered\n\tworking code, the sample would get too long for this document.\n\t\n\tWorking example code will be provided as part of the framework.\n\n\tProperties and fields\n\t\tFields (instance variables that are not publicly visible)\n\t\t\n\t\t\tFields may be either private or protected. We're outlawing public\n\t\t\teven if php supports that notion.\n\t\t\tField names shall be camelCased just like method names\n\t\t\n\t\tProperties (Instance variables or concrete pieces of instance logic\n\t\tthat are externally available through getters and/or setters)\n\t\t\n\t\ta propperty accessor can be either a getter or a setter and will have\n\t\tthe following traits:\n\t\t\t\n\t\t\tGetters:\n\t\t\t\tthe first word in the camelCased method name shall be 'get'\n\t\t\t\tfor all properties that do not denote a non-nullable boolean,\n\t\t\t\ta situation where the first word shall be 'is'.\n\t\t\t\t\n\t\t\t\tExamples on a class Person:\n\t\t\t\t-----------------------------------------------\n\t\t\t\t| Property name        | getter accessor name |\n\t\t\t\t|=============================================|\n\t\t\t\t| string Firstname     | getFirstName()       |\n\t\t\t\t| boolean OverEighteen | isOverEighteen()     |\n\t\t\t\t| integer Age          | getYearsOfAge()      |\n\t\t\t\t-----------------------------------------------\n\n\t\t\tSetters\n\t\t\tthe first word in the camelCased method name shall be 'get'\n\t\t\tfor all properties.\n\t\t\t\n\t\t\t\tExamples on a class Person:\n\t\t\t\t------------------------------------------------------------\n\t\t\t\t| Property name        | getter accessor name              |\n\t\t\t\t|==========================================================|\n\t\t\t\t| string Firstname     | setFirstName(MBString $firstName) |\n\t\t\t\t| boolean OverEighteen | setBirthDate(DateTime $date)      |\n\t\t\t\t| integer Age          | setBirthDate(DateTime $date)      |\n\t\t\t\t------------------------------------------------------------\n\t\t\t\tthe last two are obviously tricky in that the getters don't\n\t\t\t\tjust pass around instance information but contain actual logic\n\t\t\t\tthat works with the instance data.\n\nFuture goals.\n=============\n\nThe eventual goal of this project is to create a web application to build web\napplications, until such time however, there are smaller goals to achieve.\n\n- working demonstration project \"Addressbook\" that exposes the frameworks\n  built in address book\n- support many \"standard\" controls from buttons and textboxes to carousels\n  and popovers\n- provide support for framework native request handling to supply framework\n  resources\n- provide theming support\n- provide phar support\n- build a framework documentation website on this framework.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheredhead%2Fred.web","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheredhead%2Fred.web","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheredhead%2Fred.web/lists"}