These are chat archives for dingoblog/dingo

24th
May 2016
Shawn Ding
@dinever
May 24 2016 00:26
@fernandez14 Just added you: https://github.com/dingoblog/dingo/invitations
Eduardo Fernández
@fernandez14
May 24 2016 00:27
thanks @dinever
yup
just made the opened a pull request from branch fernandez14/dependency-injection
check it out
Shawn Ding
@dinever
May 24 2016 00:28
Sure
Eduardo Fernández
@fernandez14
May 24 2016 00:30
the tests failed.
anyway, I'll fix them
Eduardo Fernández
@fernandez14
May 24 2016 00:40
done
Shawn Ding
@dinever
May 24 2016 00:41
@fernandez14 As you can see from app/model/tag.go , we are already using meddler to handle all of our CRUD operations, it's not a good practice for us to introduce another ORM into the project.
Eduardo Fernández
@fernandez14
May 24 2016 00:42
Yup I know that already
I'm proposing to drop out meddler
gorm abstracts the data model way much better
I studied the model package and as far as I could see I don't see why we can't take a better approach on using native structs to query data
I think it´ll be easier to maintain on the near future when allowing not only sqlite
Eduardo Fernández
@fernandez14
May 24 2016 00:48
also think about the migrations part, how you going to manage them if its not built in
Shawn Ding
@dinever
May 24 2016 00:51
Good. As it involves a lot of work, we should probably start a new PR for the orm replacement. Can we just keep DI in dingoblog/dingo#76, and puts orm replacement in a different PR?
Eduardo Fernández
@fernandez14
May 24 2016 00:51
I know its a drastic proposal for saying something
but we could get benefit from it
what do you thing about the DI?
Eduardo Fernández
@fernandez14
May 24 2016 00:58
I thought I'd be nice implementing both at the same time cause at this precise moment almost nothing on both handler & model package can't take advantage of di due global vars. Besides the handlers will keep just growing & growing in one single package and believe me it will be a pita soon.
Eduardo Fernández
@fernandez14
May 24 2016 01:11
and also moving the ORM replacement to another PR would mean refactoring the whole model package into modules abstracting data and their mutations
just saying :P
Shawn Ding
@dinever
May 24 2016 01:20
@fernandez14 The DI looks great. I need to take a deeper look at the PR. As you can see, @samdfonseca is working on a big refactoring with the handlers in #71, so we should move more carefully to keep our work compatible with each other.
Eduardo Fernández
@fernandez14
May 24 2016 01:22
hope we can talk any time soon about it
I worked on a realtime kind of bulletin board on Go and I took a similar approach as yours on the "handlers" part
with gamification, acl, notifications, mentions and stuff
I ended up refactoring almost everything because adding new functionalities became really hard to maintain
I would not like to see that mess in here eventually
Eduardo Fernández
@fernandez14
May 24 2016 01:29
the API/web handlers should be left to basic validation logic & data consuming from other modules as much
Shawn Ding
@dinever
May 24 2016 01:30
Yeah, I agree with those ideas. We should have moved to gorm to make things easier.
Eduardo Fernández
@fernandez14
May 24 2016 01:32
yeah
the right approach would be in my opinion to progressively refactor the data handlers but using modularization and gorm
eventually model package would disappear
Shawn Ding
@dinever
May 24 2016 01:34
Can we work on refactoring modules for now? and we will wait for @samdfonseca to finish #71 before we refactoring the handlers.
Sam is going to reorganize the app/handler package into 3 new packages.
Eduardo Fernández
@fernandez14
May 24 2016 01:37
alright
I'll try to make some progress in my free time
:)
Shawn Ding
@dinever
May 24 2016 01:38
Thanks! We'd :heart: to have your contribution.
Eduardo Fernández
@fernandez14
May 24 2016 01:39
:)
:thumbsup:
and who is the team btw
what do you guys do other than dingo
Shawn Ding
@dinever
May 24 2016 01:42
I've sent you an invitation to the organization: https://github.com/dingoblog
We're just a bunch of individual developers doing this on our spare time.
Eduardo Fernández
@fernandez14
May 24 2016 01:53
thats great
thanks for the invitation :)
oh well, so do I
Eduardo Fernández
@fernandez14
May 24 2016 01:58
thought I was like a school project or something
Shawn Ding
@dinever
May 24 2016 02:05
This is going to be a serious open source project. :smile_cat: Hopefully we can have our first release in the next month.
Timothy Ye
@TimothyYe
May 24 2016 02:38
As you mentioned gorm, do you mean: https://github.com/jinzhu/gorm ?
Shawn Ding
@dinever
May 24 2016 02:40
@TimothyYe Yeah. We are thinking about using gorm to make things easier.
@fernandez14 has already done some work in #76
Timothy Ye
@TimothyYe
May 24 2016 02:50
Yeah, I also think gorm is more easier to use, our product now use gorm
Eduardo Fernández
@fernandez14
May 24 2016 15:22
:+1:
Eduardo Fernández
@fernandez14
May 24 2016 15:37
@dinever shall we work on the modularization or keep on going with current design?