{"id":16100913,"url":"https://github.com/amine-smahi/ajxnetcore","last_synced_at":"2025-03-18T07:31:22.154Z","repository":{"id":85849333,"uuid":"163873553","full_name":"Amine-Smahi/ajxnetcore","owner":"Amine-Smahi","description":"Its an innovative method to turn an ASP.NET Core Application Into Single Page Application, While enhancing the Software performance both on server and client side.","archived":false,"fork":false,"pushed_at":"2019-11-23T18:11:17.000Z","size":659,"stargazers_count":32,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-28T08:16:29.358Z","etag":null,"topics":["ajax","asp-net-core","components","dotnet-core","jquery-plugin","microsoft","single-page-app","spa"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Amine-Smahi.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}},"created_at":"2019-01-02T18:08:44.000Z","updated_at":"2023-11-07T12:50:28.000Z","dependencies_parsed_at":"2023-03-06T20:45:40.279Z","dependency_job_id":null,"html_url":"https://github.com/Amine-Smahi/ajxnetcore","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Amine-Smahi%2Fajxnetcore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Amine-Smahi%2Fajxnetcore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Amine-Smahi%2Fajxnetcore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Amine-Smahi%2Fajxnetcore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Amine-Smahi","download_url":"https://codeload.github.com/Amine-Smahi/ajxnetcore/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243910814,"owners_count":20367545,"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":["ajax","asp-net-core","components","dotnet-core","jquery-plugin","microsoft","single-page-app","spa"],"created_at":"2024-10-09T18:48:40.540Z","updated_at":"2025-03-18T07:31:22.147Z","avatar_url":"https://github.com/Amine-Smahi.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"## What is Ajxnetcore \n![ajxnetcore](https://user-images.githubusercontent.com/24621701/50636568-dbc16700-0f56-11e9-94c6-e02b0ce032c7.png)\n\nIts an innovative method to turn an ASP.NET Core Application Into Single Page Application, The goal is to reduce developer's effort while working on Creating an SPA and enhancing the Software performance both on server and client side.\n\n## Why and How it works\n\u003e Single page applications are more capable of decreasing load time of pages and the amount of data transfer from server to client. Why ? There are several pain points while working with Javascript framework like AngularJs, React, VueJs, Knockout, meteor e.t.c. in a ASP.NET Core MVC application in order to create Single-Page Application.\n#### Few Pain Points Are: \n* Need to specify routing for each request. \n* Need to modify Server side technology according to Javascript framework. \n* Only possible to debug on run time. \n* Hard-coded data-binding caused too many error. \n* Increase the complexity.\n#### So what will i get\n* No need to learn any javascript framework. \n* No need to write much Jquery code to make Single Page Application. \n* No need to write Jquery ajax code because the plugin has ajax function specified which will be called automatically as a common function.\n* Use default server side routing.\n\n#### Note: developer can also use other JavaScript framework(angularjs, knockout, react e.t.c.) side by side.\n\n## How to setup\n1) Download the js file from [here](https://raw.githubusercontent.com/Amine-Smahi/ajxnetcore/master/ajxnetcore.js) and put it in the js directory under the wwwroot folder\n2) Replace the \"_ViewStart.cshtml\" file with \n\n        @{\n          if (Context.Request.Headers[\"X-Requested-With\"] == \"XMLHttpRequest\")\n          {\n              Context.Response.Headers[\"Location\"] = Microsoft.AspNetCore.Http.Extensions.UriHelper.GetDisplayUrl(Context.Request);\n              Context.Response.Headers[\"Cache-Control\"] = \"no-store\";\n          }\n          else\n          {\n              Layout = \"_Layout\";\n          }\n        }\n\n3) Add the reference of the ajxnetcore.js file in the \"_layout.cshtml\" file\n\n        \u003cscript src=\"~/js/ajxnetcore.js\"\u003e\u003c/script\u003e\n        \n4) Put the RenderBody() inside a div with an id like this\n\n        \u003cdiv id=\"myid\"\u003e@RenderBody()\u003c/div\u003e  \n        \n5) Finnaly add the following lines just befor the closing body tag\n\n        \u003cscript\u003e\n            $(function() {\n                $('#myid').ajxnetcore();\n            })\n        \u003c/script\u003e\n\n\n## Screenshot\nYou can test this project by downloading the ajxnetcore.demo project\n\n![ajxnetcore spa .net core asp](https://user-images.githubusercontent.com/24621701/50609498-1d5aff00-0ed0-11e9-9228-105cf21ef1d2.gif)\n\n\n\n## License\nThe project is under [MIT License]() \n\n            Copyright (c) 2017 Amine Smahi\n\n            Permission is hereby granted, free of charge, to any person obtaining a copy\n            of this software and associated documentation files (the \"Software\"), to deal\n            in the Software without restriction, including without limitation the rights\n            to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n            copies of the Software, and to permit persons to whom the Software is\n            furnished to do so, subject to the following conditions:\n\n            The above copyright notice and this permission notice shall be included in all\n            copies or substantial portions of the Software.\n\n            THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n            IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n            FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n            AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n            LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n            OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n            SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famine-smahi%2Fajxnetcore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famine-smahi%2Fajxnetcore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famine-smahi%2Fajxnetcore/lists"}