fossasia / susper-backbone

Susper Backbone.js - Decentralised Search Engine https://fossasia.github.io/susper-backbone/
Other
1.52k stars 37 forks source link

Refactor the code #32

Open nikhilrayaprolu opened 7 years ago

nikhilrayaprolu commented 7 years ago

@mariobehling It looks likes the susper.com 's code is not organized , many script files are written inside the index.html without referencing them from external files, including some css. In css absolute positions are used which could be replaced with relative positions ( using bootstrap replacing custom css could also make the site responsive). Refactoring the code makes us easier to maintain susper in future and even comfortable to extend it, and easier for new contributors to start with.

mariobehling commented 7 years ago

Would be great, if you work on it.

Marauderer97 commented 7 years ago

@nikhilrayaprolu @mariobehling I would like to help with this, @nikhilrayaprolu where do I start?

nikhilrayaprolu commented 7 years ago

@Marauderer97 Yeah! go ahead! I would suggest starting with separating java script and css first, and then changing the css to make it more relative, using bootstap where you can.

mariobehling commented 7 years ago

@nikhilrayaprolu @Marauderer97 excellent initiative. Please feel free to add subissues. We definitely need this.

Marauderer97 commented 7 years ago

Hello @mariobehling I have refactored the index page of susper, but something keeps going wrong when I try to seperate the javascript from the html in yacysearch, I am working on it. Do you want me to make a PR?

mariobehling commented 7 years ago

@Marauderer97 Take your time to get it right and make a PR then. Thank you.

nikhilrayaprolu commented 7 years ago

@mariobehling why not rewrite susper.com in angular2 , or react or using some frontend library. this makes us easier to maintain, clean ,write tests and easier to extend functionalities. even integrating with travis-ci or others platforms get better

mariobehling commented 7 years ago

@nikhilrayaprolu Angular2 sounds like a good idea. Would you be willing to take this on?

Marauderer97 commented 7 years ago

@mariobehling Yes I am sure he would. @nikhilrayaprolu and I have discussed this, and we both are willing to take it on :)

mariobehling commented 7 years ago

@Marauderer97 @nikhilrayaprolu Ok, sounds great. If you are up for it, when do you think you could have a prototype in Angular2?

Marauderer97 commented 7 years ago

@mariobehling we have registrations for the spring semester in college tomorrow, so we will come with a prototype in Wednesday? :)

mariobehling commented 7 years ago

Ok, sounds great. Thank you.

nikhilrayaprolu commented 7 years ago

@mariobehling so far we have decided that we could have atleast two main components one for the initial search page and the other for search results. we would like to use angular-cli for building the project. can you give us anymore suggestions/ideas regarding this? we are planning on creating a new branch for angular2 within this repo and commit our work to it.should we proceed?

nikhilrayaprolu commented 7 years ago

@mariobehling we will try mostly to follow the same logic of present susper . if we find some logic parts better than the present ones during development in angular2 , we will update you with it. secondly we will be using typescript for angular2.since the official team suggests typescript for angular2.

mariobehling commented 7 years ago

@nikhilrayaprolu Sounds good. Please open a parent issue for the transition to Angular2 and open subissues for each area you are working on. It would be great to include others in this process and following the issue workflow could make it easier for others.

nikhilrayaprolu commented 7 years ago

@mariobehling can you create a new branch in this repo for angular2 to which we could commit all our work.

Rohanhacker commented 7 years ago

why not react ?

nikhilrayaprolu commented 7 years ago

@Rohanhacker thankyou for showing interest on this discussion.React is a very good library ("I don't call it a framework") . but if we consider angular2 ,we could see many new better features in it, and a full support as a framework (where as react is just a library and we need to extend it with other libraries for some extra functionalities). and learning angular2 is not hard for you ,as you are from react background and angular2 is syntactically similar to react (component based and one way bindings). infact the extra features like angualar-cli (inspired from ember) ,lazy loading ,dynamic loading,change detection,Ahead of time(AOT) will make angular2 completely different. look at ngrx , a redux library for angular2(ofcourse its an inspiration took from react) is lot more easier to implement compared to react-redux. in my opinion angular2 is a way preferable as it has inherited features from react ,ember and its own parent version angular v1.0 and also adding some new features along the way. Even the community has decided to change the way of releasing to SEMVER with patch releases every week, 3 monthly minor release after each major release and a major release with easy-to-migrate-over breaking changes every 6 months. which makes us updated with new features of the javascript community all the time.

Rohanhacker commented 7 years ago

@nikhilrayaprolu I think react is more popular than angular 2 so we'll be having more people already knowing react than angular 2, also beginners can face difficulty with observes and stuff.

mariobehling commented 7 years ago

@Rohanhacker Both are very popular and there is a huge crowd of people who could support either. I think the approaches are just different. If each of you prefer a different approach, you could build an app in Angular and React. We can create another reop, if you like.

Rohanhacker commented 7 years ago

@nikhilrayaprolu are you working on angular2 prototype ?

nikhilrayaprolu commented 7 years ago

yep @Rohanhacker ,I have started working on it.

nikhilrayaprolu commented 7 years ago

On 18 January 2017 at 17:26, Rohan Malhotra notifications@github.com wrote:

@nikhilrayaprolu https://github.com/nikhilrayaprolu It would be great of you can push your work on a separate branch and create a more detailed roadmap.

@Rohanhacker I have already made a prototype and detailed time line for the road map . you could check it at the parent issue raised at https://github.com/fossasia/susper.com/issues/43 . also the work related to angular is being done at a new branch named 'angular' . take a look at it ,and any inputs are appreciated.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/fossasia/susper.com/issues/32#issuecomment-273457177, or mute the thread https://github.com/notifications/unsubscribe-auth/AOgvdzmCY2VbOebZWsy0mEnL9g_Aj8S4ks5rTf4JgaJpZM4LJ7_G .