Skip to content

Commit

Permalink
Draft some content
Browse files Browse the repository at this point in the history
  • Loading branch information
ILIYANGERMANOV committed May 4, 2024
1 parent 186e1e2 commit a15a4ce
Show file tree
Hide file tree
Showing 8 changed files with 240 additions and 13 deletions.
12 changes: 5 additions & 7 deletions server/src/main/kotlin/ivy/learn/data/cms/TopicsContent.kt
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
package ivy.learn.data.cms

import ivy.learn.data.cms.course.programming.ProgrammingBasics
import ivy.learn.data.cms.course.programming.*
import ivy.learn.data.cms.dsl.TopicsDsl

object TopicsContent : TopicsDsl({
topic("Programming") {
course(ProgrammingBasics)
}
topic("Functional Programming") {

}
topic("Object Oriented Programming") {

course(ProgrammingFundamentals)
course(DataStructures)
course(FunctionalProgramming)
course(ObjectOrientedProgramming)
}
topic("Kotlin") {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
package ivy.learn.data.cms.course

import ivy.learn.data.cms.course.programming.ProgrammingBasics
import ivy.learn.data.cms.course.programming.*
import ivy.learn.data.cms.dsl.CoursesDsl

object CoursesContent : CoursesDsl({
course(ProgrammingBasics)
course(ProgrammingFundamentals)
course(DataStructures)
course(FunctionalProgramming)
course(ObjectOrientedProgramming)
})
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
package ivy.learn.data.cms.course.programming

import ivy.learn.data.cms.dsl.CourseDsl
import ivy.learn.data.cms.dsl.CourseImageUrl
import ivy.learn.data.cms.dsl.LessonImageUrl

object DataStructures : CourseDsl({
name = "Data Structures"
tagline = "Lists, Sets, Maps, Stacks, Trees and more."
imageUrl = CourseImageUrl
lesson(
name = "Arrays",
tagline = "The simplest data structure.",
imageUrl = LessonImageUrl
)
lesson(
name = "Lists",
tagline = "Arrays with superpowers. Dynamic sizing.",
imageUrl = LessonImageUrl
)
lesson(
name = "Linked Lists",
tagline = "A different take on lists. Pointers and nodes.",
imageUrl = LessonImageUrl
)
lesson(
name = "Sets",
tagline = "Unique elements. No duplicates.",
imageUrl = LessonImageUrl
)
lesson(
name = "Maps",
tagline = "Key-Value pairs. Associative arrays.",
imageUrl = LessonImageUrl
)
lesson(
name = "Stacks",
tagline = "LIFO: Last In, First Out.",
imageUrl = LessonImageUrl
)
lesson(
name = "Queues",
tagline = "FIFO: First In, First Out.",
imageUrl = LessonImageUrl
)
lesson(
name = "Trees",
tagline = "Hierarchical data structures.",
imageUrl = LessonImageUrl
)
lesson(
name = "Graphs",
tagline = "Networks of nodes and edges.",
imageUrl = LessonImageUrl
)
lesson(
name = "Heaps",
tagline = "Priority Queues. Efficiently find the max or min.",
imageUrl = LessonImageUrl
)
lesson(
name = "Tries",
tagline = "Prefix Trees. Efficient string search.",
imageUrl = LessonImageUrl
)
lesson(
name = "Hash Tables",
tagline = "Fast lookups. Key-Value pairs.",
imageUrl = LessonImageUrl
)
})
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
package ivy.learn.data.cms.course.programming

import ivy.learn.data.cms.dsl.CourseDsl
import ivy.learn.data.cms.dsl.CourseImageUrl
import ivy.learn.data.cms.dsl.LessonImageUrl

object FunctionalProgramming : CourseDsl({
name = "Functional Programming (FP)"
tagline = "Programming with mathematical functions. Pure, declarative and powerful."
imageUrl = CourseImageUrl
lesson(
name = "What is a function?",
tagline = "A mathematical relation between a set of inputs and a set of outputs.",
imageUrl = LessonImageUrl
)
lesson(
name = "Types of functions",
tagline = "Partial, total, pure. Learn these important distinctions.",
imageUrl = LessonImageUrl
)
lesson(
name = "Higher order functions",
tagline = "Functions that take functions as arguments or return functions.",
imageUrl = LessonImageUrl
)
lesson(
name = "Recursion",
tagline = "Functions that call themselves. The power of self-reference.",
imageUrl = LessonImageUrl
)
lesson(
name = "Immutability",
tagline = "Values that never change. The key to functional programming.",
imageUrl = LessonImageUrl
)
lesson(
name = "Functor",
tagline = "A type that can be mapped over. A container for a value.",
imageUrl = LessonImageUrl
)
lesson(
name = "Monad",
tagline = "A type that can be flatMapped over. The heart of FP.",
imageUrl = LessonImageUrl
)
})
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
package ivy.learn.data.cms.course.programming

import ivy.learn.data.cms.dsl.CourseDsl
import ivy.learn.data.cms.dsl.CourseImageUrl
import ivy.learn.data.cms.dsl.LessonImageUrl

object ObjectOrientedProgramming : CourseDsl({
name = "Object-Oriented Programming (OOP)"
tagline = "Model the world with objects and classes. The foundation of modern software."
imageUrl = CourseImageUrl
lesson(
name = "What is an object?",
tagline = "A self-contained entity with state and behavior.",
imageUrl = LessonImageUrl
)
lesson(
name = "What is a class?",
tagline = "A blueprint for creating objects. The definition of a type.",
imageUrl = LessonImageUrl
)
lesson(
name = "Encapsulation",
tagline = "Hiding the internal state of an object and requiring all interaction to be performed through an object's methods.",
imageUrl = LessonImageUrl
)
lesson(
name = "Inheritance",
tagline = "Creating new classes from existing classes. The 'is-a' relationship.",
imageUrl = LessonImageUrl
)
lesson(
name = "Polymorphism",
tagline = "The ability of an object to take on many forms. The 'same' method name but different behavior.",
imageUrl = LessonImageUrl
)
lesson(
name = "Abstraction",
tagline = "Hiding the implementation details of an object and showing only the necessary features.",
imageUrl = LessonImageUrl
)
lesson(
name = "Interfaces",
tagline = "A contract that defines the behavior of an object. The 'can-do' relationship.",
imageUrl = LessonImageUrl
)
lesson(
name = "Design Patterns",
tagline = "Solutions to common problems in software design.",
imageUrl = LessonImageUrl
)
lesson(
name = "SOLID Principles",
tagline = "Guidelines for writing clean, maintainable and scalable code.",
imageUrl = LessonImageUrl
)
})
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package ivy.learn.data.cms.course.programming

import ivy.learn.data.cms.dsl.CourseDsl
import ivy.learn.data.cms.dsl.LessonImageUrl

object ProgrammingBasics : CourseDsl({
name = "Programming Basics"
Expand All @@ -9,7 +10,37 @@ object ProgrammingBasics : CourseDsl({
"https://i.ibb.co/nMLdcD5/DALL-E-2024-05-04-20-50-03-A-wide-banner-image-for-a-course-titled-Programming-Basics-with-the-tagli.webp"
lesson(
name = "What is programming?",
tagline = "Learn the basics of programming",
imageUrl = "tbd"
tagline = "An introduction to programming. And why we need it?",
imageUrl = LessonImageUrl
)
lesson(
name = "Computations",
tagline = "The purpose of computers is to compute. What does that mean?",
imageUrl = LessonImageUrl
)
lesson(
name = "Variables",
tagline = "Storing computations for later use and more.",
imageUrl = LessonImageUrl
)
lesson(
name = "Branching",
tagline = "This or that? If, when, else, and other choices.",
imageUrl = LessonImageUrl
)
lesson(
name = "Loops",
tagline = "Doing things over and over again. And again. And again.",
imageUrl = LessonImageUrl
)
lesson(
name = "Functions",
tagline = "f: A -> B. Extracting computations into reusable units.",
imageUrl = LessonImageUrl
)
lesson(
name = "Classes",
tagline = "Objects. Functions with shared state. And the heart of OOP.",
imageUrl = LessonImageUrl
)
})
Original file line number Diff line number Diff line change
@@ -1,10 +1,26 @@
package ivy.learn.data.cms.course.programming

import ivy.learn.data.cms.dsl.CourseDsl
import ivy.learn.data.cms.dsl.CourseImageUrl
import ivy.learn.data.cms.dsl.LessonImageUrl

object ProgrammingFundamentals : CourseDsl({
name = "Programming Fundamentals"
tagline = "Learn the basics of programming from a different perspective."
imageUrl =
"https://i.ibb.co/nMLdcD5/DALL-E-2024-05-04-20-50-03-A-wide-banner-image-for-a-course-titled-Programming-Basics-with-the-tagli.webp"
tagline = "Explore the core ideas powering today's software."
imageUrl = CourseImageUrl
lesson(
name = "Type Systems",
tagline = "The foundation of modern programming languages.",
imageUrl = LessonImageUrl
)
lesson(
name = "Algebraic Data Types (ADTs)",
tagline = "SUMs, PRODUCTs and the core of data modeling.",
imageUrl = LessonImageUrl
)
lesson(
name = "Pattern Matching",
tagline = "The power of ADTs in action.",
imageUrl = LessonImageUrl
)
})
5 changes: 5 additions & 0 deletions server/src/main/kotlin/ivy/learn/data/cms/dsl/CmsUtil.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ package ivy.learn.data.cms.dsl
import ivy.model.LessonContent
import ivy.model.LessonItemId

val CourseImageUrl =
"https://i.ibb.co/nMLdcD5/DALL-E-2024-05-04-20-50-03-A-wide-banner-image-for-a-course-titled-Programming-Basics-with-the-tagli.webp"
val LessonImageUrl = "https://i.ibb.co/m9kB3cJ/Screenshot-2024-05-04-at-21-22-18.png"


val EmptyContent = LessonContent(
rootItem = LessonItemId(""),
items = emptyMap()
Expand Down

0 comments on commit a15a4ce

Please sign in to comment.