Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add some abstraction layer #23

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

abbas-oveissi
Copy link

@abbas-oveissi abbas-oveissi commented Apr 3, 2019

اضافه کردن لایه‌های انتزاعی به پروژه برای اینکه وابستگی بین کدها کمتر بشه، در نتیجه راحت‌تر بشه تقویم رو توسعه داد یا حتی از کدها در جاهای دیگه استفاده کرد.

Class Diagram

@Tenkei
Copy link
Owner

Tenkei commented Apr 3, 2019

Overall I think it is necessary to have some layers of abstractions as it helps to reach the ultimate goal of the project which is support for multiple calendar system, but can you answer this question; In what ways this abstraction going to improve the project?

@Tenkei
Copy link
Owner

Tenkei commented Apr 3, 2019

Also in the side note I'm interested on your view of Remark and UserEvent, I see that you inherit both Remark and UserEvent from Event and doing the same for their DataStore. I think although some similarities exist they are different entities.

@Tenkei Tenkei changed the base branch from master to develop April 3, 2019 11:57
@abbas-oveissi
Copy link
Author

Overall I think it is necessary to have some layers of abstractions as it helps to reach the ultimate goal of the project which is support for multiple calendar system, but can you answer this question; In what ways this abstraction going to improve the project?

اگر بخوام چندتا مثال به عنوان نمونه بگم که این لایه‌های abstraction چطوری به پروژه کمک میکنن، میتونم به اینا اشاره کنم:

۱- اگر نیاز باشه تقویم میلادی ساخته بشه، کافیه فقط یه پیاده‌سازی جدید از CalendarManager نوشته بشه.

۲- اگر نیاز باشه این امکان به پروژه اضافه بشه که کاربر بتونه رویدادهاشو بجای Google Calendar روی یه وب‌سرویس ذخیره کنه، کافیه فقط یه پیاده‌سازی جدید برای MutableEventDataSource نوشته تا رویدادهارو از وب‌سرویس گرفته و ثبت بشن.

۳- شاید کاربری دوست داشته باشه بجای رویدادهای رسمی کشور، رویدادهای مرتبط با دین زرتشت رو روی تقویمش ببینه. خودش میتونه یه پیاده‌سازی از EventDataSource بنویسه و بدون تغییر بخش دیگه‌ای، تقویمی که دوست داره رو داشته باشه.

پینوشت اول: البته این مدل نهایی نیست، مثلا برای مورد ۲ باید اینترفیس‌ها بصورتی تغییر کنن که Async ساپورت باشن، الان همه رو بصورت Sync درست کردم. منظورم اینه که این یه مدل اولیه هست.

@abbas-oveissi
Copy link
Author

abbas-oveissi commented Apr 4, 2019

Also in the side note I'm interested on your view of Remark and UserEvent, I see that you inherit both Remark and UserEvent from Event and doing the same for their DataStore. I think although some similarities exist they are different entities.

من اینجوری در نظر گرفتم که هرچیزی روی تقویم داریم یه رویداد حساب (اینترفیس Event) میشه. فرق رویدادها فقط اینه بعضی‌هاشون قابل تغییر هستند و بعضیشون غیرقابل تغییر هستند. بخاطر این مدل نگرش برای نوشتن EventDataSource و MutableEventDataSource نیاز بود که Remark و UserEvent یه اینترفیس رو پیاده کنن.

البته به این هم فکرکردم جدا باشن. شاید حتی جدا باشن، پیاده‌سازی این مدل تمیزتر هم بشه. جزء چیزهایی هست که نیاز
به بحث داره.

@Tenkei Tenkei force-pushed the develop branch 3 times, most recently from 3bd1a31 to bd2aefc Compare April 24, 2019 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants