frontend

React architecture for a huge business application

跟風遠走 提交于 2019-12-02 16:19:20
So we've recently picked up React in our company as the front-end technology to build our huge business web application. By saying recently, I mean we don't have any previous experience with React (we have a huge background of AngularJS), and by saying huge application, I mean it's really huge and very dynamic with lots and lots of different pieces and functionality. Because we will have a lot of huge components that all play a very important role and have complex logic inside them, and because we want them to be easily pluggable and reusable, we want them to be as isolated as possible from

How to go to a specific file in Chrome Developer Tools?

点点圈 提交于 2019-12-02 15:41:43
I am developing a web application with a heavy front-end approach. By using Dojo and the AMD-way, I currently have testing screens which may easily load over a hundred different javascript files. When I want to debug for any specific problem, or verify if I am seeing an old version of a specific file, I find it really hard to find my files in the Sources tab in the Chrome Developer Tools. Is there any shortcut or action I can make that will let me type the name of a file and will take me to the source of that file? CD.. While in the sources tab use CTRL + O ( ⌘ + O for Mac) to search scripts,

What is a good back-end to use with AngularJS [closed]

淺唱寂寞╮ 提交于 2019-12-02 14:22:28
I want to know your suggestions about a good back-end to use with AngularJS as a front-end. Why is your suggested back-end good and is it easy to use, or easy to learn? There is considerable risk in this question for opinion-based answers, so I suggest a more critical evaluation: Restful server-side implemenations ... Will make working with angular considerably easier and less painful as well as being true to the HTTP spec with all the good things that entails. In any language that you choose ensure that the framework allows for the minimum of effort in doing this. In my experience: PHP :

Frontend testing: what and how to test, and what tool to use?

和自甴很熟 提交于 2019-12-02 14:04:20
I have been writing tests for my Ruby code for a while, but as a frontend developer I am obviously interested in bring this into the code I write for my frontend code. There is quite a few different options which I have been playing around with: CasperJS Capybara & Rspec Jasmine Cucumber or just Rspec What are people using for testing? And further than that what do people test? Just JavaScript? Links? Forms? Hardcoded content? Any thoughts would be greatly appreciated. Carlos I had the same questions a few months ago and, after talking to many developers and doing a lot of research, this is

Ember.js or Backbone.js for Restful backend [closed]

一笑奈何 提交于 2019-12-02 13:47:09
I already know that ember.js is a more heavy weight approach in contrast to backbone.js. I read a lot of articles about both. I am asking myself, which framework works easier as frontend for a rails rest backend. For backbone.js I saw different approaches to call a rest backend. For ember it seems that I have to include some more libraries like 'data' or 'resources'. Why are there two libraries for this? So whats the better choice? There arent a lot of examples to connect the frontend with the backend too. Whats a good working example for a backend rest call to this: URI: ../restapi/topics GET

Search user by custom fields ( user_meta ) in the front end

左心房为你撑大大i 提交于 2019-12-02 13:16:16
问题 I have a large amount of users which I'm displaying on the front end with WP_User_Query . I have a search function on this front end user database, and need to be able to search by custom fields, which each profile has a number of. Currently the search engine will search for standard wp user fields such as 'user_firstname', 'user_lastname', but won't search my custom fields ('institution' & 'equipment' in this example), and I'm not sure why. The Query: $search = ( isset($_GET['search-meta'])

is there a program or a framework which allows to build cross browser compatible html and css codes?

扶醉桌前 提交于 2019-12-02 10:06:49
问题 I know there are programs like dreamweaver but none of them has significant success when it comes to creating automatic cross browser compatible html and css codes. I was wondering, is there a framework or program that i can use for creating more cross browser compatible HTML and CSS layout ? Currently, i am using a virtual windows xp version running on vmware to check how web pages looks in IE6, and manually using Chrome, Firefox, Opera and Safari. 回答1: What you want doesn't really exist as

Magento external login will not create session cookie

爷,独闯天下 提交于 2019-12-02 09:59:27
I am trying to replace a rather clumpsy ajax-login of Magento from an external site. The site uses Magento as a shop. Both the site and the magento-shop has their own logins, therefor when a user logs in it is important that both are synchronized. This was done with an ajax-call each page reload, keeping the user logged into Magento. I want to remove this so I created a check on each page reload which will do everything server-side. My problem is, the following code does not work properly: //Get Magento session-object Mage::getSingleton("core/session", array("name"=>"frontend")); $session =

how to handle backend errors in js frontend inside of object and with out object

筅森魡賤 提交于 2019-12-02 09:31:49
问题 i have user login and i have 2 errors handlers email & password empty email & password not match with data base through post man i send empty user name and password result is { "errors": { "email": "please enter valid emails", "password": "please enter password" } } email and password wrong the result is { "general": "email or password not match" } i notice 1st error its have object errors and 2nd not have my react js code is // i remove css and imports class login extends Component {

I'm creating an html template that looks like windown but have problems with the resizers

邮差的信 提交于 2019-12-02 09:01:16
I'm creating an windown look like template for web but I have a problem with the resizer, the resizer in the bottom right works perfectly but trying to create the top right resizer don't work and I don't know why I have tried everything but it doesn't work. Here's the github https://github.com/alhazacod/windowsxphtmltemplate The JavaScript code: dragru.onmousedown = function(event) { let shiftLeft = event.clientX - wwindow.getBoundingClientRect().left; let shiftTop = event.clientY - wwindow.getBoundingClientRect().top; let shiftBottom = - event.clientY + wwindow.getBoundingClientRect().bottom;